Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created July 8, 2011 17:17
Show Gist options
  • Save terrancesnyder/1072303 to your computer and use it in GitHub Desktop.
Save terrancesnyder/1072303 to your computer and use it in GitHub Desktop.
Simple Data Table Example
<fr:datatable width="100%" height="300px">
<xhtml:thead>
<xhtml:tr>
<xhtml:th fr:sortable="true" fr:sortKey="text">Note</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="text">Creation Time</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="participant">Participant</xhtml:th>
<xhtml:th fr:sortable="true" fr:sortKey="activityName">Activity</xhtml:th>
</xhtml:tr>
</xhtml:thead>
<xhtml:tbody>
<xforms:repeat nodeset="instance('notes')/noteBasicInfo">
<xhtml:tr>
<xhtml:td>
<xforms:output ref="text"/>
</xhtml:td>
<xhtml:td>
<xforms:output ref="creationDate" xxforms:format="format-dateTime(., '[M01]/[D01]/[Y] - [h01]:[m01]:[s01]')"/>
</xhtml:td>
<xhtml:td>
<xforms:output ref="participant"/>
</xhtml:td>
<xhtml:td>
<xforms:output ref="activityName"/>
</xhtml:td>
</xhtml:tr>
</xforms:repeat>
</xhtml:tbody>
</fr:datatable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment