0

I do not want load-on-demand! Please help

asked 2009-04-01 20:43:40 +0800

satyanadiminti gravatar image satyanadiminti
69 1

All,

First, thanks for the huge support database out here.

I am using the zk tree component and have customized the code in the person tree example at http://www.zkoss.org/smalltalks/zkTreeModel/. My tree (with checkboxes) is loaded with live data and has the following structure

Grandparent
--Parent 1
----Child 1.1
----Child 1.2
--Parent 2
----Child 2.1
----Child 2.2

The Grandparent node is a static node (just one node whose value is populated in code) and the subsequent nodes are loaded with live data.

The problem I am facing is that when the data loads initially, only the children of Parent 1 are being loaded and not those of Parent 2. The children of Parent 2 get loaded only when I click the + mark beside Parent 2 after which the render method will be called again. To understand what's going on, I added another grand parent node and then noticed that Parent 1 and Parent 2 are both loaded initially. Basically, if there are N grandparents, N parents under each grandparent will be loaded in the first go without having to call the render method again.

This is probably an offshoot of the load-on-demand feature discussed in the smalltalk I pasted above. But I do not want that to happen. My data is not huge and I will not have performance issues, so I want all the parents and their children to be loaded in the first go. ZK documentation states that if the "fulfill" attribute is not specified for a component, all of its data will be loaded in the first go, but it doesn't seem to happen in this case. Can you please suggest if there is any solution to this problem?

I will post the code if required. Thank you very much,

S

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2009-04-02 02:14:33 +0800

dennis gravatar image dennis
3679 1 6
http://www.javaworld.com....

yes, please post the reproducible code as simple as possible here
:)

link publish delete flag offensive edit

answered 2009-04-04 00:37:11 +0800

satyanadiminti gravatar image satyanadiminti
69 1

Thanks for the response. I was able to come up with a workaround for this problem.

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: 2009-04-01 20:43:40 +0800

Seen: 280 times

Last updated: Apr 04 '09

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