Stefan Burkard wrote:
> hi all
>
> is it technically possible to generate tables with displaytag that have 
> a dynamic number of columns?
>   
Yes absolutely. This is another example from one of my sites:

<display:table name="data" id="d" sort="list">
    <c:forEach var="field" items="${report.headers}">
        <display:column title="${field.value}" property="${field.key}"/>
    </c:forEach>
</display:table>

> but can this work? is it guaranteed that the jstl-tag is executed before 
> display-tag? can the display-tag be evaluated after it was generated by 
> jstl?
>   
I understand it in this way: The <display:table> code asks the jsp 
processor for its body. The processor extracts the body and first thing 
it sees is a <c:forEach> tag so it follows that tag's instructions, "for 
Each field in the report.headers collection output a <display:column> 
tag". So it
builds a collection of <display:column> tags and this is what is 
returned to the <display:table> code.
So the <display:table> code never gets to see the <c:forEach> only the 
results of its evaluation, a collection of <display:column> tags which 
is exactly what it wants.

Ed!

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to