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/signingbonus
-------------------------------------------------------
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