<bean:define id="tablename" value='<%= "table" + i%>'/>
instead of
<bean:define id="tablename" value="table<%=i%>"/>
?? Didier
B�rd Arve Evjen wrote:
I have several tables I need to output with a for loop, but I need to set the id different for each table to enable sorting. I've tried this:
<% for (int i=0; i < initialMarginTypes.length; i++) { request.getSession().putValue("im", imh.getInitialMarginsOnType(initialMarginTypes[i].type)); %> <bean:define id="tablename" value="table<%=i%>"/> <tr> <td valign="top"> <b><%= initialMarginTypes[i].typeName %></b> <br> <display:table id="<%=tablename%>" name="im" scope="session" width="100%" pagesize="100" requestURI="result.jsp" sort="list" decorator="com.om.condico.util.web.ColumnsWrapper"> <display:column title="<%=ldeliveryPeriod%>" property="deliveryPeriod" sort="true" headerClass="sortable" nulls="true" width="20%"/> <display:column title="<%=lhours%>" property="hours" align="center" sort="true" headerClass="sortable" nulls="true" width="10%"/> <display:column title="<%=lboughtVol%>" property="boughtVolume" align="center" sort="true" headerClass="sortable" nulls="true" width="10%"/> <display:column title="<%=lsoldVol%>" property="soldVolume" align="center" sort="true" headerClass="sortable" nulls="true" width="10%"/> </display:table> <br><br> </td> </tr> <% request.getSession().removeValue("im"); } %>
I've also tried to set it using java, like:
String tablename = "table"+i;
and refer it like <%=tablename%> but that not work either.
Can anyone help me out here?
Cheers, Bard
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user
------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0 _______________________________________________ displaytag-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-user

