Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

[T5] Grid default sort column

Christoph Jaeger

2008-10-24

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

I have got a problem with setting the default sort column for a grid
after updating from 5.0.14 to 5.0.15.

This code, inspired by some comments on this list, works perfectly
nice on 5.0.14, but breaks on 5.0.15:

@SetupRender
public void setDefaultSortOrder()
{
 if (grid.getSortModel().getSortConstraints().isEmpty())
 {
  grid.getSortModel().updateSort("code");
 }
}

It works on 5.0.15 the first time a page is displayed. For the second
time (just clicking the same link in my menu), I get a
NullPointerException at org.apache.tapestry5.corelib.components.Grid
$DefaultGridSortModel.getSortConstraints(Grid.java:372). Somehow the
dataModel seems to be null in this second request.

Is there a better / preferred way to set the default sort order?
Should I file a JIRA?

Thanks,

Christoph


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.