0

Clearing Grids with paging mold (7.0.5)

asked 2015-04-21 08:48:55 +0800

cocoes gravatar image cocoes flag of Spain
94 6

updated 2015-04-21 08:50:09 +0800

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

delete flag offensive retag edit

Comments

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

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-04-22 05:14:42 +0800

echarish gravatar image echarish flag of Japan
1809 7
http://jp.linkedin.com/in...

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

link publish delete flag offensive edit
0

answered 2015-04-22 09:14:53 +0800

cocoes gravatar image cocoes flag of Spain
94 6

Hello everybody,

it has been accepted as a bug:

http://tracker.zkoss.org/browse/ZK-2722

Clearing a 1 row grid throws the exception.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2015-04-21 08:48:55 +0800

Seen: 23 times

Last updated: Apr 22 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More