This class creates an HTML table tag according to the specified inner HTML template (tr, td, etc.),
and the specified data table:
GXITable
.
The table tag will duplicate the first HTML row and will insert dynamic values from the data table. The
binding of child tags to the data table is done using the ID attributes which match the relevant column name in the data table.
Syntax:
<gx:table id=�ItemsTable�>
<tr>
<th> ItemNumber</th>
<th> Item Description</th>
</tr>
<tr>
<td id=�ItemNumber�>dummy data</td>
<td>
<input id=�ItemDesc� size=�10� value=�sample data�>
</td>
</tr>
</gx:table>
The result will be:
<table id=�ItemsTable�>
<tr>
<th> ItemNumber</th>
<th> Item Description</th>
</tr>
<tr>
<td id=�ItemNumber_000�>1007</td>
<td>
<input id=�ItemDesc_000� size=�10� value=�Banana�/>
</td>
</tr>
<tr>
<td id=�ItemNumber_001�>1008</td>
<td>
<input id=�ItemDesc_001� size=�10� value=�Apple�/>
</td>
</tr>
...
</table>
Note: The ID attributes of the cloned rows, will be changed to <ORIGINAL_TAG_ID>_00<ROW INDEX>
.
The data table is set to the tag by using the method
getTagsAccesor().setTagTable(String, GXITable, GXITableBuildConfig, GXITableEvents)
which can be accesed using the
getTagsAccesor()
method.
The
setTagTable
method accepts also a table build configuration class which provides common parameters for the table creation
and a table-events class, which provides you the ability to change the data and/or HTML of a created row (tr) ,cell (td), or a control (any other child tag under a cell).