And to Andr�, yes, I've tried to use pure java.
Paul, can you post the modified code so I do not have to figure out how to do it? Please :-)
Cheers, Bard
----- Original Message -----
From: Didier Dubois <[EMAIL PROTECTED]>
Date: Fri, 22 Aug 2003 21:54:12 +0200 To: [EMAIL PROTECTED]
Subject: Re: [displaytag-user] Problem setting unique id name for many tables
And what about (from a previous answer from Matt)
<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
------------------------------------------------------- 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

