Ok, I fixed the problem by updating displaytag source codes:
org.displaytag.render.HtmlTableWriter.java
Did the following changes:
==================================
// add column number as link parameter
if(headerCell.getSortName() != null)
{
href.addParameter(encodeParameter(TableTagParameters.PARAMETER_SORT),
headerCell.getSortName());
}
else if (!this.tableModel.isLocalSort() &&
(headerCell.getSortName() != null))
{
href.addParameter(encodeParameter(TableTagParameters.PARAMETER_SORT),
headerCell.getSortName());
href.addParameter(encodeParameter(TableTagParameters.PARAMETER_SORTUSINGNAME),
"1");
}
else
{
href.addParameter(encodeParameter(TableTagParameters.PARAMETER_SORT),
headerCell.getColumnNumber());
}
Now it works!
--
Lu Ying
On 06/03/2010 03:56 PM, Emi Lu wrote:
> On 06/03/2010 03:17 PM, Emi Lu wrote:
>> Hello List,
>>
>> For external sorting,
>>
>> req.getParameter((new
>> ParamEncoder(tableID)).encodeParameterName(TableTagParameters.PARAMETER_SORT))
>>
>> is to retrieve column number such as 1, 2, ....
>>
>> But is there a way to retrieve "lname", "gname", etc
>>
>> but not the number ?
>>
> SortName already set in display:column, but still returns column order
> but not colum name?
>
> Someone knows why? I believed this was a bug in 1.1 shown as
>
> http://www.mail-archive.com/[email protected]/msg05945.html
>
> But I am using 1.2, still have the problem?
>
> How?
> Thanks a lot!
> --
> Lu Ying
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user