Tuesday, August 19, 2008

Struts - Table

<display:table name="sessionScope.campList" id="tableReport" pagesize="${page}" requestURI="campSearch.do" class="headertable" style="width:100%;" sort="list">

<display:column paramId="campId" paramProperty="campId" titleKey="campId" headerClass="rowHeader" class="rowContent" sortable="true">

<span id="tagtip<s:property value="%{#rowCounter}"/>" style="display: none;">
<table width="300" class="tooltips"><tr><th colspan="2">Tag List
</th></tr>
<c:forEach var="tag" items="${tableReport.tags}" >
<tr><td>
<c:out value="${tag.tagId}"></c:out></td><td>
<c:out value="${tag.location}"></c:out></td></tr>
</c:forEach></table></span>
<s:div onmouseover="TagToTip('%{'tagtip' + #rowCounter}')" onmouseout="UnTip()">
<c:out value="${tableReport.campId}"></c:out>
</s:div></display:column>

<display:column property="startDate" format="{0,date,dd/MM/yyyy}" titleKey="startDate" headerClass="rowHeader" class="rowContent" sortable="true"/>

<display:column property="startTime" format="{0,date,HH:mm:ss}" titleKey="startTime" headerClass="rowHeader" class="rowContent" sortable="true"/>

<s:set name="rowCounter" value="%{#rowCounter + 1}"/>
</display:table>
***********************

tableReport.tags is a list in sessionScope.campList
tag.tagId is a variable in tags list object

No comments: