I implemented a tree using CSS/Javascript with the methodology outlined here:
http://gethelp.devx.com/techtips/dhtml_pro/10min/10min0702/td072602-4.asp

You could achieve what your are trying to do using that.

To 'ajaxify' it, and load nodes on demand you could try adding a wicket AjaxLink around your branch div, and have that replace a target component in your Panel that holds all the <div> elements for tree nodes that have been loaded. Then the regular javascript call would make the nodes visible for the branch item just clicked.


Question might be what order the calls are made - showbranch or load new divs, if showBranch comes first you'd need to workaround.


-evan



David Griffiths wrote:
Hi, how far away is Wicket from being able to do this:

- create a tree object initially displaying only the root node
- when you click to expand a node do it via a xmlhttprequest to the server
- the server responds with just the children which are inserted into the DOM rather than the entire page or entire tree object being redrawn

and as an optional nice-to-have:

- preload the children as hidden elements and have an expand operation use javascript to make the children visible locally (no roundtrip delay) whilst meanwhile calling the server to add new hidden grandchildren in the background.

Thanks,

Dave



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to