Hi There,
I'm using displaytag 1.1, running on WebLogic 9.2 and using Struts2.
I'm trying to test displaytag by setting up a simple table with dummy data.
The dummy data comprises 3 objects stored in an ArrayList within my Action
class.
The table DOES display data however, it only displays the final object in the
List so I get 1 row displayed instead of 3.
Code snippets:
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<display:table id="errorList" name="errorList" cellspacing="1" >
<dissplay:column property="sequence"/>
<display:column property="dateCreated" title="Date Created" />
<display:column property="crn" title="CRN" />
<display:column property="xrf" title="XREF" />
<display:column property="status" />
</display:table>
HTML source: (it seems to at least define empty rows for the data which is
missing!!)
<table cellspacing="1">
<thead>
<tr>
<th>Sequence</th>
<th>Date Created</th>
<th>CRN</th>
<th>XREF</th>
<th>Status</th></tr></thead>
<tbody>
<tr class="odd">
<td>333</td>
<td>Fri May 11 10:05:20 GMT+12:00 2007</td>
<td>789</td>
<td>789</td>
<td>Investigatin</td></tr>
<tr class="even">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td></tr>
<tr class="odd">
<td></td>
<td></td>
<td></td>
<td></td>
<td></td></tr></tbody></table>
Action class:
(has global ArrayList object named errorList)
ListViewData listViewData = new ListViewData();
listViewData.setSequence(new Long(111));
listViewData.setDateCreated(new Date());
listViewData.setCrn("123");
listViewData.setXrf("123");
listViewData.setStatus("New");
ListViewData listViewData2 = new ListViewData();
listViewData.setSequence(new Long(222));
listViewData.setDateCreated(new Date());
listViewData.setCrn("456");
listViewData.setXrf("456");
listViewData.setStatus("Parked");
ListViewData listViewData3 = new ListViewData();
listViewData.setSequence(new Long(333));
listViewData.setDateCreated(new Date());
listViewData.setCrn("789");
listViewData.setXrf("789");
listViewData.setStatus("Investigatin");
errorList.add(listViewData);
errorList.add(listViewData2);
errorList.add(listViewData3);
Any help would be appreciated. I think I'm using displaytag correctly so I'm
wondering if it could be an environment problem.......
====================================================================================
This e-mail message and attachments do not necessarily reflect the views of
the New Zealand Ministry of Justice and may contain
information that is confidential and may be subject to legal privilege. If you
are not the intended recipient, you are hereby notified that you must not use,
disseminate, distribute or copy this e-mail message or its attachments. If you
received this message in error, please notify the Ministry of Justice
by telephone (call collect: 00-64-4-918-8800) or return the
original message to us by e-mail, and destroy any copies.
Thank you.
====================================================================================
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user