incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Naresh Bhatia" <>
Subject RE: RE: Re: Using Dojo with Trinidad
Date Tue, 10 Oct 2006 16:37:09 GMT

Thanks for the pointers - starting to look at javadocs for DataModel.

This has been a very useful thread for my JSF understanding - so thanks
again for helping me out.


-----Original Message-----
From: Adam Winer [] 
Sent: Tuesday, October 10, 2006 11:48 AM
Subject: Re: RE: Re: Using Dojo with Trinidad

On 10/9/06, Naresh Bhatia <> wrote:
> Aha. These few sentences clarify the intent of TreeModel more that the
> entire javadoc for this class! Thanks so much, Adam. I was earlier
> thinking that TreeModel represents the entire tree and there must be
> something like "TreeNode" that would represent nodes in the tree. But
> now that you put it this way, it appears that TreeModel IS the node in
> the tree and, in a special case, could be the root of the tree. Is my
> understanding correct?

No, TreeModel is an entity that knows how to navigate around
an object hierarchy.  It isn't the object hierarchy itself.

Start by understanding JSF's DataModel class;  TreeModel is
a hierarchical extension of that class.

> If so, here's my follow up question (and this is the newbie speaking,
> please bear with me): It appears that the approach you mention below,
> will keep the tree's loaded state somewhere in the web container
> (probably session).

No, not entirely.  The expansion state will be saved using
JSF state saving.  But the TreeModel is as stateful as you
want it to be - if you create it at request scope, it's at
request scope.

> Does the TreeModel support the creation of a
> completely stateless implementation, i.e act as a passthrough to the
> client? If not, is this the real difference between TreeTable and
> perhaps a JavaScript/AJAX implementation that will keep the complete
> state on the client side?

The difference between an entirely DHTML table and a JSF
table is that an entirely DHTML table gives you relatively
little of a server-side programming model.

-- Adam

View raw message