incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clemens Schneider <clemens.schnei...@gmail.com>
Subject Re: Using Dojo with Trinidad
Date Tue, 10 Oct 2006 01:23:24 GMT
I think Adam meant, that TreeTable doesn't load all the data to the 
client, but instead fetches the required -fully initialized- data from 
the backing TreeModel, when a node is expanded. To lazy load parts of 
the TreeModel, you'll have to add (e.g.) proxy objects to the TreeModel 
that fetch the data when required or subclass TreeModel to add lazy 
loading capabilities... Is it possible to use a ResultSet with 
TreeModel, too? Then this would be a possibility, too..

-clem

Naresh Bhatia wrote:
> Well, by "lazy loading" I mean that the entire tree should not be
> fetched from the service layer (or the data access layer) in one shot.
> Instead, only immediate child nodes should be fetched when a node is
> expanded. I think that's what you mean too, but I just wanted to be
> clear about it.
>
> Having said that, I did not readily see how lazy loading would work in
> TreeTable documentation. Here's my JSP code:
>
> <tr:treeTable var="node" value="#{treeTableBean.treeModel}"
>  
> rowDisclosureListener="#{treeTableBean.processRowDisclosureEvent}"
>         rendered="true"
>         rowsByDepth="20"
>         summary="Company">
>     ....
> </tr:treeTable>
>
> Here's my TreeTableBean:
>
> public class TreeTableBean {
>     private TreeModel treeModel = null;
>
>     public TreeModel getTreeModel() {
>         if (treeModel == null) {
>             // Get the entire tree from the service layer
>             TreeNodeVO root = getTreeService().getTree("Company");
>             treeModel = new ChildPropertyTreeModel(root, "children");
>         }
>
>         return treeModel;
>     }
>     ...
> }
>
> If getTreeModel() would just return a partial tree, I don't know how
> TreeTable will ask for more nodes. The only interface I see in
> <tr:treeTable> to fetch the tree is the value attribute, which in my
> case is poining to a TreeModel. Given my current understanding, please
> let me know how I could lazy load the tree.
>
> Naresh
>
> -----Original Message-----
> From: Adam Winer [mailto:awiner@gmail.com] 
> Sent: Monday, October 09, 2006 12:43 PM
> To: adffaces-user@incubator.apache.org
> Subject: Re: RE: Using Dojo with Trinidad
>
> What do you mean by "does not do lazy loading"?  TreeTable
> definitely doesn't load all the data of the tree up front.
>
> -- Adam
>
>
> On 10/7/06, Naresh Bhatia <NBhatia@sapient.com> wrote:
>   
>> BTW, forgot to answer your other question. Yes, I do plan to create a
>> custom component in Dojo. (Specifically a TreeTable component - I know
>> there is one in Trinidad, but as far as I can tell it does not do lazy
>> loading and couple other requirements I have.)
>>
>> Naresh
>>
>> -----Original Message-----
>> From: Naresh Bhatia [mailto:NBhatia@sapient.com]
>> Sent: Saturday, October 07, 2006 6:28 PM
>> To: adffaces-user@incubator.apache.org
>> Subject: RE: Using Dojo with Trinidad
>>
>> jMaki is on my TODO list to review. A cursory look suggests that it
>>     
> will
>   
>> work with JSF (https://ajax.dev.java.net/usingFaces.html), but there
>>     
> is
>   
>> no mention of ADF Faces or Trinidad. My question is specific to
>> Trinidad, because Trinidad seems to take over some of the events like
>> "onLoad" etc. thus potentially encroaching the Dojo turf. I am already
>> having several problems integrating Dojo with with Trinidad raw (see
>> some of my other posts today) - without using any frameworks, so I
>>     
> want
>   
>> to be extra careful bringing other variables in. One thought that did
>> cross my mind is to NOT use Trinidad on pages where I want to use
>>     
> Dojo.
>   
>> Anyway I am waiting on the experts in this group to enlighten me :-).
>>
>> Naresh
>>
>> -----Original Message-----
>> From: Clemens Schneider [mailto:clemens.schneider@gmail.com]
>> Sent: Saturday, October 07, 2006 5:02 PM
>> To: adffaces-user@incubator.apache.org
>> Subject: Re: Using Dojo with Trinidad
>>
>> Did you have a look at JMaki? Or are you searching for infos for
>>     
> custom
>   
>> component development?
>>
>> -clem
>>
>> Naresh Bhatia wrote:
>>     
>>> Does anyone have any pointers or samples for using Dojo with
>>>       
> Trinidad?
>   
>>>
>>> Thanks
>>>
>>> Naresh
>>>
>>>
>>>
>>>       
>
>   

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message