0

Strange behavior of CONTENTS_CHANGED for tree view updates

asked 2013-02-22 11:32:46 +0800

avidD gravatar image avidD
166 2

updated 2013-02-22 11:42:33 +0800

Hi, we have several nested trees displaying different types of objects. Clicking on a tree item opens a form to edit the item. When the form is saved the content of the tree which is still displayed on the left hand side is updated. In this situation we have a strange behavior, namely, tree items change position in the view. This is the situation we have before the update: image description the user has selected the node ff and will now change the name of the node On changing the value of the node we issue the following event to ZK:

mModel.fireEvent(
          TreeDataEvent.CONTENTS_CHANGED,        // event type
          new int[] { },                         // path to parent
          1,                                     // from
          1);                                    // to

Now this is the situation we have after zk handled the event: image description The child of bb is now displayed under ff. Also collapsing bb will now ("correctly") remove cc from the view, expanding ff has no effect.

This seems very very strange. Has anyone run into this before?

The view is correct if I call invalidate() on the tree at once after issueing the event. This, however, seems a bit expensive as our trees contain thousands of nodes and this is acually against the idea of AJAX to update only what has changed, right?

Cheers, David

delete flag offensive retag edit

Comments

can you try with ZK 6.5.2-FL version?

jumperchen ( 2013-02-25 06:57:19 +0800 )edit

The problem persists with 6.5.2.FL.20130123.

avidD ( 2013-02-26 13:44:46 +0800 )edit

hi, can you post a runnable sample code that can reproduce the issue?

samchuang ( 2013-03-19 00:55:56 +0800 )edit
Be the first one to answer this question!
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
1 follower

RSS

Stats

Asked: 2013-02-22 11:32:46 +0800

Seen: 11 times

Last updated: Feb 22 '13

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