Portlet Factory, Version 6.1.2


 

Page automation example: editing an HTML page automation template

The following HTML represents a master template that has been modified (note comment sections) to achieve various display results. There are additional examples in the form of partial templates. These partial templates would be additions or changes to the master template to achieve the specific effects described.

<HTML><body>
<!-- For this template, assume Data Entry pages have 4 columns -->
<table name="DataEntryPageWrapper">
<span name="PageContentsContainer">
<!-- Note that all elements named "*Container" will be emptied. Their contents are kept (elsewhere) to define other nodes. You can define them inside the container for convenience, but it is not necessary to do so.
-->
<span name="DataEntryGroupWrapper">
<!-- Let's put a horizontal rule at the top of every group. colspan is 4 so it will stretch across the all the Date Entry Field columns -->
<tr><td colspan="4"><hr /></td></tr>
<span name="LabelContainer">
<tr name="DataEntryGroupLabel">
<!-- colspan is 4 so it will stretch across the all the Date Entry Field columns -->
<td colspan="4" name="LabelText" class="sectionLabel"> Sample Data Entry Group Label
</td>
</tr>
</span> <!-- end DataEntryGroupWrapper.LabelContainer -->
<span name="GroupContainer">
<span name="DataEntryGroup"> <!-- RepeatElement defaults here -->
<span name="DataContainer">
<!-- Here defining the "normal" data entry field -->
<tr name="DataEntryField">
<td class="label"><span name="FieldLabel">Sample Field Label</span></td>
<td><span name="FieldRequired">*</span></td>
<td><span name="FieldElement">Sample Field Element</span></td>
<td><span name="FieldValidationError">Sample Validation Error</span></td>
</tr>
</span> <!-- end DataEntryGroup.DataContainer -->
</span> <!-- end DataEntryGroup construct -->
</span> <!-- end DataEntryGroupWrapper.GroupContainer -->
</span> <!-- end DataEntryGroupWrapper construct -->
</span> <!-- end DataEntryPageWrapper.PageContentsContainer-->
</table> <!-- end DataEntryPageWrapper construct -->
<!-- For this Display Page, let's plan to have a table tag as the wrapper, and the fields will all have just two columns, for label and data. -->
<table name="DisplayPageWrapper">
<!-- Let's put a horizontal rule at the top of every group. colspan is 4 so it will stretch across the all the Date Entry Field columns -->
<tr><td colspan="4"><hr /></td></tr>
<span name="PageContentsContainer">
<span name="DisplayGroupWrapper">
<span name="LabelContainer">
<tr name="DisplayGroupLabel">
<!-- colspan is 2 so it will stretch across the label and data columns -->
<td colspan="2" name="LabelText" class="sectionLabel"> Sample Display Group Label
</td>
</tr>
</span> <!-- end DisplayGroupWrapper.LabelContainer -->
<span name="GroupContainer">
<span name="DisplayGroup">
<tr><td colspan="2"><hr /></td></tr>
<span name="DataContainer">
<!-- Here defining the "normal" display field -->
<tr name="DisplayField">
<td class="label"><span name="FieldLabel">Sample Field Label</span></td>
<td><span name="FieldElement" >Sample Field Data</span></td>
</tr>
</span> <!-- end DisplayGroup.DataContainer -->
</span> <!-- end DisplayGroup construct -->
</span> <!-- end DisplayGroupWrapper.GroupContainer -->
</span> <!-- end DisplayGroupWrapper construct -->
<!-- while we are still inside the DisplayPageWrapper.PageContentsContainer, let's go ahead and define the TableWrapper construct, as well. Remember that it might have to live inside either a DisplayGroupWrapper OR a DataEntryGroupWrapper. Note that both of those are TABLE tags, with either 2 or 4 columns expected. -->
<span name="TableWrapper">
<span name="LabelContainer">
<tr name="TableLabel">
<td colspan="4" name="LabelText" class="sectionLabel">Sample Table Label</td>
</tr>
</span> <!-- end TableWrapper.LabelContainer -->
<tr><td colspan="4"> <!-- to fit inside Data Entry Page Wrapper -->
<span name="GroupContainer"> <!start of TableWrapper.GroupContainer -->
<table name="Table" class="myTableClass">
<tr name="TableHeaderContainer">
<th name="ColumnHeader" align="left" class="label">
<span name="HeaderElement">Sample Header</span>
</th>
<th name="ColumnHeaderSorted" align="left" class="label">
<a name="HeaderElement" class="labelSortLink">Sample Header 2</a>
</th>
</tr> <!-- end Table.TableHeaderContainer -->
<tr name="RepeatElement">
<td name="ColumnData" align="left" class="myColumnData">
<span name="DataElement" >Sample Data</span>
</td>
</tr> <!-- end Table.RepeatElement -->
</table> <!-- end Table construct -->
</span> <!-- end TableWrapper.GroupContainer -->
</td></tr>
</span> <!-- end TableWrapper construct -->
</span> <!-- end DisplayPageWrapper.DataContainer -->
</table> <!-- end DisplayPageWrapper construct -->
</body></HTML>

Parent topic: Page Automation HTML templates Parent topic: Page automation example: adding spacer rows to a table


Library | Support |