0

Treeitem.detach() does not work

asked 2006-04-24 17:52:05 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3701061

By: netwiser

Hi, I created a tree with dynamic treeitems created or deleted. It worked perfectly in zk1.1, but after I upgraded to zk1.2RC1 and RC2, the delete( treeitem.detach() did not work properly. The detach() did return "true" and it was removed from the tree object, howver, at client side, the treeitem was still there.

Here is the code:

Treerow row = item.getTreerow();
Treecell idCell = (Treecell) row.getChildren().get(0);
Treecell descriptionCell = (Treecell) row.getChildren().get(1);
Image newImage = (Image) idCell.getChildren().get(0);
newImage.removeEventListener("onClick", listener);
Label idLabel = (Label) idCell.getChildren().get(1);
Image delImage = (Image) idCell.getChildren().get(2);
delImage.removeEventListener("onClick", listener);

Textbox inputBox = (Textbox) descriptionCell.getChildren().get(0);
inputBox.removeEventListener("onChange", listener);

log.debug(" Parent type : " + item.getParent().getClass().getName());
1----log.debug(item.getParent().removeChild(item));
2---- item.setParent(null);
log.debug(" Finish remove the tree item " + item.getId());
3---- item.detach();
4---- item.setPage(null);
I tried all the method that can do the detach() action and no luck at all.

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2006-04-24 17:54:00 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3701065

By: netwiser

The detach() method is working correctly with Label, Image and Textbox.

link publish delete flag offensive edit

answered 2006-04-24 17:55:43 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3701073

By: netwiser

By the way, the detach() method throws out exception in IE:

Failed to process rmAttr
Object doesn't support this property or method
_pcm3
zk_onClick
Failed to process rmAttr
Object doesn't support this property or method
_pco3
zk_onClick
Failed to process rmAttr
Object doesn't support this property or method
_pcq3
zk_onChange


link publish delete flag offensive edit

answered 2006-04-25 03:57:37 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3701659

By: henrichen

Hi James,

Please post this to bug, so we can track it. Thanks.

/henri

link publish delete flag offensive edit
Your reply
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

RSS

Stats

Asked: 2006-04-24 17:52:05 +0800

Seen: 353 times

Last updated: Apr 25 '06

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