Hi
I have a problem with a grid, i did a custom grid in a Form when i sort the
grid there isn't problem but i use a button in my form after sorting grid
after i have an exception :
java.lang.NullPointerException
org.apache.tapestry5.corelib.components.Grid$DefaultGridSortModel.getSortConstraints(Grid.java:346)
org.apache.tapestry5.corelib.components.Grid.setupDataSource(Grid.java:463)
In my .java
// List to fill the grid
@Persist
private List listGrid;
public Object onActivate() {
/* fill list for the grid /
listGrid = (List) userManager.findString("select u from
Users u inner join fetch u.role inner join fetch u.shop w");
}
// sent list to the grid
public List getList() {
return (List) listGrid;
}
@SetupRender
void initializeValue() {
i=((grid.getCurrentPage()-1) * (grid.getRowsPerPage())+1);
// Grid model
this.model =
beanModelSource.createDisplayModel(Users.class,messages);
this.model.add("shop",pcSource.create(Users.class,
"shop.shoCode")).sortable(false);
this.model.add("role",pcSource.create(Users.class,
"role.rolDesignation")).sortable(false);
this.model.add("count",null);
this.model.add("remove",null);
this.model.exclude("useDateCreat","useDateModif","useId","usePassword");
this.model.reorder("count","useReference","useFirstname","useName","useLogin","useEmail","shop","role","useActive","remove");
}
tml page :
${getCount()}
${user.useReference}
${user.shop.shoCode}
Is somebody can help me to solve this problem? I have tried lot of
things.
Thanks in advance
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/T5-1-0-5-problem-with-a-grid-tp4885091p4885091.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org