I've done exactly as you propose.  Wrote my own tree viewing library
though.  It's not very hard to do, each element has a "thing" for the
actual item, and then another "thing" for child items.  At they're
simplest, the "things" would just be DIVs, but you'll probably end up
with a DIV containing two DIVs (for the item and children), and then
an A for the item as well.  But who knows.

You just set up some data structures that keep track of what items
have undergone a child check, and if they haven't render an "expand
me" icon.  When clicked, it should request children from the server,
and then render them into the "thing" for the item's children.  That
way you don't have to completely rerender every update.

Also, I believe that FarCry has something like this in there.  Not
sure how it works, but I seem to recall a dynamically expanding tree. 
It's all free (as in speech and beer), so you could well hijack code
from there, and maybe get both pieces (the DHTML and the JS Remoting)
and have them already integrated as well.

cheers,
barneyb

On 6/19/05, James Holmes <[EMAIL PROTECTED]> wrote:
> OK, I've been investigating this for a while and the major stumbling
> block is finding a JS tree control that allows branches to be inserted
> at runtime; everything I've found so far requires the whole tree to be
> defined in some way before the actual tree content is generated.
> 
> Does anyone know of a JS tree that has an API for inserting branches
> at runtime (e.g. from a remoting request via AJAX)?
> 


-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209959
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to