Minimol Joseph wrote:
> Thank you Ed for the reply.
>  
> I tried the suggestion but it always defaults to the first value
> [code]

That's because I didn't fully understand where you were getting the 
value to test from. If you want to alter the contents of the cell 
depending on a value of the row object then you need to put the 
<c:choose> tag inside a <display:column> tag and create the link 
yourself (see below). If you were choosing which column to display based 
on another object then my original suggestion is the one to go for.

The contents of the <display:table> are only evaluated once when the 
table is started so in the original suggestion every row in the whole 
table was using the first <display:column>.

The contents of the <display:column> are evaluated for each row allowing 
you to make decisions based on the values in each row object.

<display:column titleKey="apps.id" sortable="true" />

<c:choose>

<c:when test="${CRList.status == s}">

    <a href="editCRs.html?appid=${CRList.appid}">${CRList.appid}</a>

</c:when>

<c:otherwise>

    <a href="viewCRs.html?appid=${CRList.appid}">${CRList.appid}</a>

</c:otherwise>

</c:choose>

</display:column>

If you are using this column in more than one place it is probably 
better to place the code into a decorator.



Ed!

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to