Project

General

Profile

1
<h2>Common properties in config</h2>
2

    
3
<p>
4
There are some object properties that are commonly used in the config file.
5
All common properties are optional and if they are missing, a reasonable default 
6
behaviour is provided.
7
Specific Objects may define additional properties and these may be required.
8
</p>
9

    
10
<p>
11
Every Object in the config file must have a unique ID assigned to it.
12
ID's are assigned to the objects as an attribute, not as a property.
13
</p>
14

    
15
<h3>Model properties</h3>
16
<dl>
17
<dt>defaultModelUrl</dt>
18
<dd>The URL where the model gets loaded from.  
19
  If the method is HTTP GET, then include the full query string in the URL.  
20
  If present, the model will be loaded when the application loads.
21
</dd>
22
</dl>
23

    
24
<h3>Tool properties</h3>
25
<dl>
26
<dt>targetModel</dt>
27
<dd>The id of a model object which this tool acts on.  
28
If absent the action happens on the parent model of this tool.
29
</dd>
30
</dl>
31

    
32
<h3>Widget properties</h3>
33
<dl>
34
<dt>htmlTagId</dt>
35
<dd>The ID of the HTML element in the web page where this widget's output 
36
should be placed.  
37
If this property is missing, the widget's ID attribute will be used instead.
38
</dd>
39
<dt>targetModel</dt>
40
<dd>The id of a model object which this tool acts on.  
41
If absent the action happens on the parent model of this tool.
42
</dd>
43
<dt>stylesheet</dt>
44
<dd>This property specifies a relative or absolute URL to a stylesheet that 
45
can replace the default stylesheet.  
46
The stylesheet must be served from the same domain as the mapbuilder applicaiton.  
47
</dd>
48
<dt>debug</dt>
49
<dd>An empty property element to show debugging output during widget processing.
50
</dd>
51
</dl>
52

    
53
<h3>Specialized widgets</h3>
54
<p>
55
There are a few specialized widget types that are extensons of the basic Widgets: 
56
MapContainers and Buttons.  
57
These widgets can have all the above properties but also define some properties 
58
of their own.
59
</p>
60

    
61
<h3>MapContainer widgets</h3>
62
<p>
63
A MapContainer widget is one that renders geography in 2 dimensions.
64
</p>
65

    
66
<dl>
67
<dt>mapContainerId</dt>
68
<dd>The ID of a &lt;DIV&gt; element that will be created to hold the output of widgets
69
that render in 2 dimensions, maps in particular.
70
A MapContainer will overlay the output of all widgets that have the same 
71
mapContainerId in the order that they are encountered in the config file.
72
</dd>
73
</dl>
74

    
75
<h3>Button widgets</h3>
76
<p>
77
Buttons are widgets whose output is a linked image which executes a function
78
when clicked.
79
A radio button will swap it's image for another one when selected.
80
</p>
81

    
82
<dl>
83
<dt>buttonBar</dt>
84
<dd>Equivalent to the htmlTagId property for placing buttons in a page.  
85
Buttons get appended to this HTML element in sequence.
86
</dd>
87
<dt>class</dt>
88
<dd>Specifies the type of button.  
89
Permitted values include "Button" and "RadioButton".  
90
A Button class will execute it's action immediately when pressed.  
91
A "RadioButton" has enabled and disabled state and only one button 
92
in a buttonBar group can be enabled at any one time.
93
</dd>
94
<dt>disabledSrc</dt>
95
<dd>Partial skin path to graphic source when this button is not selected.
96
Must be supplied for all buttons.
97
</dd>
98
<dt>enabledSrc</dt>
99
<dd>Partial skin path to graphic source when this button is selected.
100
Must be supplied for RadioButtons.
101
</dd>
102
<dt>selected</dt>
103
<dd>Boolean value (true or false) to inidicate the initial state of this button.
104
</dd>
105
<dt>mouseHandler</dt>
106
<dd>The id of a tool object on which to register mouse events.  
107
Optional, if absent mouse events are not handled and the action is the doSelect function.
108
</dd>
109
<dt>action</dt>
110
<dd>An objectID.method() to be called when the button is selected.
111
</dd>
112
</dl>
113

    
114

    
115
<p align="right">
116
<a href="?page=config/opvRule">previous</a>&nbsp;&nbsp;&nbsp; 
117
<a href="?page=config/skins">next</a>
118
</p>
(6-6/7)