Portlet Factory, Version 6.1.2


 

Adding data from another source to a table on which a data page operates

You can display additional data to a table by adding a named tag to the table.

  1. In the HTML for the table, include a <td /> element for the additional column. For example:
    <table name="customers">
    <tr><th>Name</th><th>ID</th></tr>
    <tr name="customer">
    <td><span name="name"></span></td>
    <td><span name="id"></span></td>
    <td><span name="email"></span></td>
    </tr>
    </table>

  2. Add a variable or some other source of XML data that contains the email address for each customer in the data. For example:
    <emailAddresses>
    <emailAddress>tfrid@acme.com</emailAddress>
    <emailAddress>lhammond@acme.com</emailAddress>
    <emailAddress>hdolan@acme.com</emailAddress>
    <emailAddress>jdoe@acme.com</emailAddress>
    </emailAddresses>

  3. Add a builder call to the model, to display the additional data in the column. Use the loop variable added to WebApp by the Data Page to specify the index of the email element to display. For example, for a Text builder call, specify the following indirect reference to display the email address for the current customer row in the table:
    ${Variables/email/emailAddresses/emailAddress[${Variables/customerCounterVar}]}

Parent topic: About using your own HTML form pages


Library | Support |