-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathtable.html
More file actions
418 lines (390 loc) · 14.8 KB
/
Copy pathtable.html
File metadata and controls
418 lines (390 loc) · 14.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Centrallix Application Server: Widget Documentation</title>
<link rel="StyleSheet" href="style.css" type="text/css">
</head>
<body>
<!-- PAGE BREAK: 'table.html' -->
<h2 class="widgetname"><a name="table">table</a></h2>
<p class="widgettype">type: <span class="widgettypevalue">widget/table</span></p>
<p class="widgettype">visual: <span class="widgettypevalue">yes</span></p>
<p class="widgettype">container: <span class="widgettypevalue">no</span></p>
<p class="widgettype">form element: <span class="widgettypevalue">no</span></p>
<h3 class="overview">Overview:</h3>
<span class="overview">
<p>A table widget is used to display data in a tabular format. It consists of a header row with column labels, followed by any number of rows containing data.The header may have a different color or image scheme than the rows, and the rows may or may not be configured to alternate between two colors or background images.</p>
Table widgets come in three different flavors: static, dynamicpage, and dynamicrow.Static table widgets are built on the server and write their data directly into the container in which they reside, which is usually a scrollpane widget. Dynamicpage table widgets load their data once they initialize on the client, by activating a query through an ObjectSource nonvisual widget.Dynamicpage table widgets do not support modification, but can be reloaded through an ObjectSource at will.Dynamicrow table widgets, on the other hand, display each row as an individual layer, and thus are modifiable on the client. Dynamicrow table widgets also load their contents through an ObjectSource widget query.As of the time of writing of this document, only <i>static</i> mode and <i>dynamicrow</i> mode were supported.
<p>Table widgets allow the selection (keyboard, mouse, and data focus) of individual rows.</p>
</span><h3 class="usage">Usage:</h3>
<span class="usage">
<p>Table widgets are normally placed inside of a scrollpane so that any rows which don't fit int the container can still be viewed. Table columns are created via "widget/table-column" child widgets within the table widget.</p>
</span><h3 class="properties">Properties:</h3>
<table class="properties">
<tr>
<th class="name">Property</th>
<th class="type">Type</th>
<th class="description">Description</th>
</tr>
<tr>
<td class="name">allow_selection</td>
<td class="type">yes/no</td>
<td class="description">Whether to permit the user to select rows in the table. Default "yes".</td>
</tr>
<tr>
<td class="name">background</td>
<td class="type">string</td>
<td class="description">A background image for the table. This "shows through" between table cells.</td>
</tr>
<tr>
<td class="name">bgcolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, to be used between table cells and rows.If neither bgcolor nor background are specified, the table is transparent.</td>
</tr>
<tr>
<td class="name">cellhspacing</td>
<td class="type">integer</td>
<td class="description">The horizontal spacing between cells in the table, in pixels. Default is 1.</td>
</tr>
<tr>
<td class="name">cellvspacing</td>
<td class="type">integer</td>
<td class="description">The vertical spacing between cells in the table, in pixels. Default is 1.</td>
</tr>
<tr>
<td class="name">colsep</td>
<td class="type">integer</td>
<td class="description">The width of the column separation lines in pixels. Default is 1.</td>
</tr>
<tr>
<td class="name">data_mode</td>
<td class="type">string</td>
<td class="description">Either "rows" (default) or "properties". In "properties" mode, the table displays one row per attribute, and so only displays the current record in the objectsource. In "rows" mode, the table displays one row per record in the objectsource.</td>
</tr>
<tr>
<td class="name">demand_scrollbar</td>
<td class="type">integer</td>
<td class="description">Acts as a boolean to only show the scrollbar when it is needed (activates when it is set to "1").</td>
</tr>
<tr>
<td class="name">dragcols</td>
<td class="type">integer</td>
<td class="description">Whether to allow dragging of column boundaries to resize columns; set to 1 to allow it and 0 to disallow. Default is 1.</td>
</tr>
<tr>
<td class="name">followcurrent</td>
<td class="type">yes/no</td>
<td class="description">Set to 'yes' to cause the table's current row to follow the currently selected object in the ObjectSource, and 'no' to disable this behavior. Default is 'yes'.</td>
</tr>
<tr>
<td class="name">gridinemptyrows</td>
<td class="type">integer</td>
<td class="description">Whether to show the table's grid in rows which do not hold data. Set to 1 to show the grid or 0 to not show it; default is 1.</td>
</tr>
<tr>
<td class="name">hdr_background</td>
<td class="type">string</td>
<td class="description">A background image for the header row cells.</td>
</tr>
<tr>
<td class="name">hdr_bgcolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, for the header row cells.</td>
</tr>
<tr>
<td class="name">hide_scrollbar</td>
<td class="type">integer</td>
<td class="description">Acts as a boolean to determine if the scrollbar can be seen (hide is "1").</td>
</tr>
<tr>
<td class="name">height</td>
<td class="type">integer</td>
<td class="description">The height in pixels of the table.</td>
</tr>
<tr>
<td class="name">image_max_height</td>
<td class="type">integer</td>
<td class="description">The maximum height of the image from the child.</td>
</tr>
<tr>
<td class="name">image_max_width</td>
<td class="type">integer</td>
<td class="description">The maximum width of the image from the child.</td>
</tr>
<tr>
<td class="name">initial_selection</td>
<td class="type">string</td>
<td class="description">Sets which data element in the table has focus initially.</td>
</tr>
<tr>
<td class="name">inner_border</td>
<td class="type">integer</td>
<td class="description">width of the inner spacing between cells in a table. Default0.</td>
</tr>
<tr>
<td class="name">inner_padding</td>
<td class="type">integer</td>
<td class="description">margins within each cell, in pixels. Default is 0 pixels.</td>
</tr>
<tr>
<td class="name">max_rowheight</td>
<td class="type">integer</td>
<td class="description">The maximum height of each row.</td>
</tr>
<tr>
<td class="name">min_rowheight</td>
<td class="type">integer</td>
<td class="description">The minimum height of each row.</td>
</tr>
<tr>
<td class="name">newrow_background</td>
<td class="type">string</td>
<td class="description">A background image for the "new row" placeholder that is visible when a new object is being created.</td>
</tr>
<tr>
<td class="name">newrow_bgcolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, for the "new row" placeholder that is visible when a new object is being created.</td>
</tr>
<tr>
<td class="name">objectsource</td>
<td class="type">string</td>
<td class="description">Identifies the OSRC that the table connects to.</td>
</tr>
<tr>
<td class="name">outer_border</td>
<td class="type">integer</td>
<td class="description">width of the outer spacing around the outside of the table, in pixels. Default0.</td>
</tr>
<tr>
<td class="name">overlap_scrollbar</td>
<td class="type">integer</td>
<td class="description">Acts as a boolean to allow the scroll bar to overlab with the table (allow is "1").</td>
</tr>
<tr>
<td class="name">reverse_order</td>
<td class="type">integer</td>
<td class="description">Acts as a boolean to reverse to order of the table elements (reverses if set to "1").</td>
</tr>
<tr>
<td class="name">row1_background</td>
<td class="type">string</td>
<td class="description">A background image for the table row cells.</td>
</tr>
<tr>
<td class="name">row1_bgcolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, for the table row cells.</td>
</tr>
<tr>
<td class="name">row2_background</td>
<td class="type">string</td>
<td class="description">A background image for the table row cells. If this is specified, rows will alternate in backgrounds between "row_background1" and "row_background2".</td>
</tr>
<tr>
<td class="name">row2_bgcolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, for the table row cells. If this is specified, rows will alternate in colors between "row_bgcolor1" and "row_bgcolor2".</td>
</tr>
<tr>
<td class="name">row_border_color</td>
<td class="type">string</td>
<td class="description">Determines the color of the edge of the rows.</td>
</tr>
<tr>
<td class="name">row_border_radius</td>
<td class="type">string</td>
<td class="description">Determines the sharpness of the row corners, smaller is more sharp.</td>
</tr>
<tr>
<td class="name">rowcashe_size</td>
<td class="type">integer</td>
<td class="description">How many rows are shown in the table.</td>
</tr>
<tr>
<td class="name">rowheight</td>
<td class="type">integer</td>
<td class="description">The height of the individual rows in pixels. Default is 15 pixels.</td>
</tr>
<tr>
<td class="name">rowhighlight_background</td>
<td class="type">string</td>
<td class="description">A background image for the current (selected) row cells.</td>
</tr>
<tr>
<td class="name">rowhighlight_bgcolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, for the current (selected) row cells.</td>
</tr>
<tr>
<td class="name">row_shadow_color</td>
<td class="type">string</td>
<td class="description">The color of the shadow of the row.</td>
</tr>
<tr>
<td class="name">row_shadow_offset</td>
<td class="type">integer</td>
<td class="description">How far the shadow is from the row.</td>
</tr>
<tr>
<td class="name">row_shadow_radius</td>
<td class="type">integer</td>
<td class="description">The sharpness of the corners of the shadow, smaller means more sharp.</td>
</tr>
<tr>
<td class="name">show_selection</td>
<td class="type">yes/no</td>
<td class="description">Whether to highlight the currently selected row. Default "yes".</td>
</tr>
<tr>
<td class="name">textcolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, of the text in the normal data rows.</td>
</tr>
<tr>
<td class="name">textcolornew</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, of the text in the "new row" placeholder.</td>
</tr>
<tr>
<td class="name">textcolorhighlight</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, of the text in the highlighted data row.</td>
</tr>
<tr>
<td class="name">titlebar</td>
<td class="type">yes/no</td>
<td class="description">Whether to show the title bar of the table. Default "yes".</td>
</tr>
<tr>
<td class="name">titlecolor</td>
<td class="type">string</td>
<td class="description">A color, RGB or named, of the text in the header row. If unset, defaults to textcolor.</td>
</tr>
<tr>
<td class="name">width</td>
<td class="type">integer</td>
<td class="description">Width, in pixels, of the table.The height is determined dynamically.</td>
</tr>
<tr>
<td class="name">windowsize</td>
<td class="type">integer</td>
<td class="description">The maximum number of rows to show at any given time, for dynamic tables.</td>
</tr>
<tr>
<td class="name">x</td>
<td class="type">integer</td>
<td class="description">X-coordinate of the upper left corner of the table. Default is 0.</td>
</tr>
<tr>
<td class="name">y</td>
<td class="type">integer</td>
<td class="description">Y-coordinate of the upper left corner of the table. Default is 0.</td>
</tr>
</table>
<h3 class="childproperties">Child Properties:</h3>
<p class="childname">(of widget/table-column child widgets)</p>
<table class="childproperties">
<tr>
<th class="name">Property</th>
<th class="type">Type</th>
<th class="description">Description</th>
</tr>
<tr>
<td class="name">align</td>
<td class="type">string</td>
<td class="description">The alignment of the column: "left" or "right".</td>
</tr>
<tr>
<td class="name">caption_fieldname</td>
<td class="type">string</td>
<td class="description">It is a pseudonym for the fieldname.</td>
</tr>
<tr>
<td class="name">caption_textcolor</td>
<td class="type">string</td>
<td class="description">The color of the caption_fieldname.</td>
</tr>
<tr>
<td class="name">group_by</td>
<td class="type">string</td>
<td class="description">Acts as a boolean to determine if items are group able.</td>
</tr>
<tr>
<td class="name">height</td>
<td class="type">integer</td>
<td class="description">The height in pixels of the column.</td>
</tr>
<tr>
<td class="name">title</td>
<td class="type">string</td>
<td class="description">The title of the column to be displayed in the header row.</td>
</tr>
<tr>
<td class="name">type</td>
<td class="type">string</td>
<td class="description">The type of the column: "text", "check", "image", or "progress". "text" is a normal column, and displays the textual value of the data element. "check" displays a checkmark if the data is non-zero (integers) or for strings if the value is non-empty and not "N" or "No". "image" displays the image referred to by the pathname contained in the data value. "progress" displays a progress bar, with additional fields such as bar_color, bar_textcollor, and bar_padding.</td>
</tr>
<tr>
<td class="name">width</td>
<td class="type">integer</td>
<td class="description">width of the column.</td>
</tr>
<tr>
<td class="name">wrap</td>
<td class="type">string</td>
<td class="description">Determines if text can wrap around an obstacle.</td>
</tr>
</table>
<h3 class="actions">Actions:</h3>
<table class="actions">
<tr>
<th class="name">Action</th>
<th class="description">Description</th>
</tr>
<tr>
<td class="name">Clear</td>
<td class="description">Drops all elements from the table.</td>
</tr>
</table>
<h3 class="events">Events:</h3>
<table class="events">
<tr>
<th class="name">Event</th>
<th class="description">Description</th>
</tr>
<tr>
<td class="name">Click</td>
<td class="description">The Click event fires when a user clicks on a row.</td>
</tr>
<tr>
<td class="name">DblClick</td>
<td class="description">The DblClick event fires when the user double-clicks the mouse on a row. Passes three values, 'Caller' which is the table's name, 'recnum' which is the sequential number of the record in the table, and 'data' which is an array of the data in the selected record.</td>
</tr>
<tr>
<td class="name">RightClick</td>
<td class="description">The Click event fires when a user right clicks on a mouse or mouse pad.</td>
</tr>
</table>
<h3 class="sample">Sample Code:</h3>
<pre>
$Version=2$
// Here is a simple static table.
tblFileList "widget/table"
{
sql = "select :name,annotation=condition(:annotation=='','-none-',:annotation)
from /samples";
mode="static";
width=408;
inner_border=2;
inner_padding=1;
bgcolor="#c0c0c0";
row_bgcolor1="#e0e0e0";
hdr_bgcolor="white";
textcolor="black";
name "widget/table-column" { title="Object Name";width=20; }
annotation "widget/table-column" { title="Annotation"; width=25; }
}
</pre>
</body>
</html>