If you're using 1.0 b2, give the table and "id" attribute, and then give
your column a body and write the link yourself:
<display:table id="foo">
<display:column>
<a href="mylink?id=<c:out value="${foo.id}"/>...
</display:column>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Monika Adamczyk
> Sent: Monday, January 19, 2004 11:12 AM
> To: [EMAIL PROTECTED]
> Subject: [displaytag-user] problem with sorting column which
> is generated using TableDecorator
>
>
> I have a table decorator that generates a column as an href
> link using more than 1 attribute of the current row object.
>
> The code is something like this:
>
> public class MyHrefDecorator extends TableDecorator
> {
> public String getHref()
> {
> Object o = getCurrentRowObject();
>
> // creates string <a
> href="http://SOMEURL?attribute1=1&attribute2=2">
> //Name</a>
> String hrefStr = ... o.getAttribute1 ... + o.getAttribute2
>
> return hrefStr
> }
>
> }
>
>
> On the jps page, the column tag is set as follows: <table:column
> title="Header1"
> property="href"
> sortable="true"
> width="400"
> maxLength="400"/>
>
> On initial loading of the page, the table loads and generates
> everything correctly. However if I click on the Header1 to
> sort table by this column, there is NullPointerException in
> my decorator class: Object o = getCurrentRowObject(); - this
> object is null. If I try to sort by other columns (which
> don't use decorators), I don't have a problem with sorting.
>
> I can't use column decorator since I need to build link from
> more than one row object attribute. Can someone suggest how I
> can solve this problem?
>
> Thanks
> Monika
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbo> nus
>
>
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim,
> CA. http://www.eclipsecon.org/osdn
> _______________________________________________
> displaytag-user mailing list [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
displaytag-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/displaytag-user