Dean Pullen wrote:
> I can't see why that isn't working, but yes that is what I meant :-/

Well, it's a completely reasonable construct, so you're not insane :^)

The reason *I THINK* it fails is because the <display:table> tag is not an
iterative tag like <c:foreach>.  Instead, it's more like <c:set> or
something.  An iterative tag will re-evaluate its contents each time,
while a non-iterative tag evaluates it only once.

So, if I'm right (and I'm adding all these qualifiers because I'm
surmising based on this behavior but haven't looked at the actual code!),
the <display:table> tag look at its contents and subtags, then stores that
stuff.  It then sets up a iterator that goes over the list, putting the
data from each list item into the table structure that it created at the
very beginning, but NOT re-evaluating the tags themselves.

A simple test for this would look something like this (assume you have a
list named "items"):

<c:set var="showTable" value="true" />

<display:table name="items" uid="item">
  <c:if test="${showTable}">
    <c:set var="showTable" value="${!showTable}"/>
    <display:column property="prop1"/>
    <display:column property="prop2"/>
    <display:column property="prop3"/>
  </c:if>
</display:table>

Now, if I'm correct, this will display the contents of the list.  Change
the value of showTable to false and reload and the table would go away. 
But that <c:set> inside the <c:if> won't affect whether or not the table
is affected the next iteration.

-- 
Rick Herrick
[EMAIL PROTECTED]

I haven't got time for inner peace.

"No reasonable definition of reality could be expected to permit
this."--Albert Einstein, Boris Podolsky and Nathan Rosen in 1935



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to