first of all, set your java variable in jsp scope:
<c:set var="tableid" value="<%= prop2 %>" />

<display-el:table uid="${tableid}" [...]>

then to print object fields, this solution should work:
<c:out value="${pageScope[tableid].code}" />

Hope this helps,

Yannick


On 6/20/07, SourceForge.net <[EMAIL PROTECTED]> wrote:
>
> Read and respond to this message at:
> https://sourceforge.net/forum/message.php?msg_id=4371606
> By: molloyda
>
>
> I am having problems with multiple DisplayTag-el tables on the one html page.
> Or rather, I am having problems when there are 'n' numbers of tables.  I can
> quite easily create two staticly named tables using uid="row1" for the first
> table and uid="row2" for a second table and so on.
>
> However, I currently have a forEach loop around my display tag tables and I
> am struggling with how I can generate unique uids and then reference them:
>
> For example each loop generates a unique id in 'prop2' and then displays the
> table using the following:
>
> <ajax:displayTag id="<%= prop2 %>" ajaxFlag="displayAjax">
> <display-el:table requestURI="broadsheet/broadsheet_programme_body.jsp"
> name="${student.broadsheetModuleResultsVector}"   class="displaytag" 
> defaultsort="2"
> defaultorder="ascending" export="true" uid="<%= prop2 %>" 
> excludedParams="ajax">
>
>    <display-el:column title="Code" sortable="true" headerClass="sortable">
>        <c:out value=" **** What to do here ****" />
>    </display-el:column>
>    <display-el:column title="Description" sortable="true" 
> headerClass="sortable"
> >
>        <c:out value=" **** What to do here ****" />
>    </display-el:column>
> </display-el:table>
> </ajax:displayTag>
>
>
> Please see the "***** What to do here *****" flags?  Previously I just had 
> uid="row1"
> and then used 'row1.code', 'row.description' etc to reference the object 
> fields.
>
> Is it possible to use some other default name for the "current row", like 
> <c:out
> value="${uid.code}" />
>
> I've tried all sorts of things like <c:out value="${<%=prop2%>.code}" /> which
> don't work (nor did I expect that they would).
>
> Any help would be greatly greatly appreciated.  I am amazed at this project
> so far and it has solved so many of my other problems.
>
> Kind regards,
> David Molloy
>
>
> ______________________________________________________________________
> You are receiving this email because you elected to monitor this forum.
> To stop monitoring this forum, login to SourceForge.net and visit:
> https://sourceforge.net/forum/unmonitor.php?forum_id=249318
>
> -------------------------------------------------------------------------
> 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
> displaytag-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/displaytag-user

-------------------------------------------------------------------------
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
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to