-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Following the bug here supposed to be corrected on 7.0.5: http://tracker.zkoss.org/browse/ZK-2651 , I've modified the grid to use mold="paging":
<grid id="grid" model="${model}" rowRenderer="${renderer}" onCreate="buildGrid()" mold="paging" autopaging="true" pageSize="3">
, and the grid clearing for this:
void test() {
grid.getModel().clear();
//grid.getChildren().clear();
}
, but it throws an exception "-1". And if I try to clear the children the exception thrown says: "The paging component cannot be removed manually. It is removed automatically when changing the mold".
Is there any way to clear a grid with paging mold? Or it's a bug?
Many thanks
Hello
You can use invalidate() method available to all components to redraw the component with new values or changed settings. here is the method definition for your reference.
http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zk/ui/AbstractComponent.html#invalidate()
Harish
Hello everybody,
it has been accepted as a bug:
http://tracker.zkoss.org/browse/ZK-2722
Clearing a 1 row grid throws the exception.
Asked: 2015-04-21 08:48:55 +0800
Seen: 23 times
Last updated: Apr 22 '15
listbox with groupsmodel and paging
Stop paging propagation on a Grid
Why is it so cumbersome to have control over the setTotalSize of the pagination in a grid
continuous scroll based dynamic paging
Listbox and grid paging not working
Issue on listbox height when paging
By the way, it doesn't seems to be a bug, as it works the same way since ZK 6.5.5 . Any idea how to do it?
cocoes ( 2015-04-21 09:41:45 +0800 )edit