views:

193

answers:

3

Hi, I have a table in my JSP page generated with Struts2 tags and some HTML:

<table border="1">
<tr>
<th>Action</th>
  <s:iterator value="columnNames" id="name">
    <th> <s:property value="name" /> </th>
  </s:iterator>
</tr>
 <s:iterator value="%{table}" id="row">
 <tr>
   <td>
   <s:form theme="simple">
    <s:hidden key="row" />
    <s:submit action="remove" value="Remove" 
    onclick="return confirm('Are you sure you want to delete this item?');"/>
    <s:submit action="displayEdit" value="Edit"/>
    </s:form>
    </td>
     <s:iterator value="%{#row}" id="cell">
          <td><s:property value="%{#cell}"/></td>
     </s:iterator>
 </tr>
 </s:iterator>
</table>

However, I want to use the Display Tag library so I can limit a certain amount of rows to be shown at once (or if anyone else knows a better solution, let me know). I'm not sure how to make my table work without losing any functionality of my previous table.

NOTES: columnNames is an ArrayList<String>, and table is an ArrayList<ArrayList<String>> in my Action class.

A: 

Nevermind, I have it figured out.

Raymond
A: 

can u plz share, i'm havin the same prob

auddy
A: 

i need the solution too. Can u pls?