[Yanel-dev] DataRepoSitetreeResource and lazy loading

simon litwan simon.litwan at wyona.com
Mon Apr 21 13:40:08 CEST 2008


Michael Wechner schrieb:
> simon litwan wrote:
>
>> Michael Wechner schrieb:
>>
>>> simon litwan wrote:
>>>
>>>> hi all
>>>>
>>>> i think we shoud add something like this:
>>>> showChildren = 
>>>> Boolean.valueOf(getResourceConfigProperty("show-children")).booleanValue(); 
>>>>
>>>> to the DataRepoSitetreeResource to allow lazy loading of branches.
>>>>
>>>> WDYT?
>>>
>>>
>>>
>>> you mean that not everything is loaded at once when accessing
>>>
>>> http://127.0.0.1:8080/yanel/MY_REALM/yanel/data-repository-sitetree.html 
>>>
>>>
>>> ?
>>>
>>> we have planned to introduce some AJAX for this, e.g.
>>
>> that's what i'm doing.
>
>
> ok
>
>>>
>>> http://extjs.com/license
>>>
>>> and I think this would only load the branches incrementally anyway 
>>> and hence such a configuration wouldn't be necessary.
>>
>> i don't think anyway. this magic ajax thing needs a way to load only 
>> the children of a node without grand-children. otherwise it's not 
>> incrementally.
>
>
> I think we should rather enhance
>
>    /**
>     *
>     */
>    public java.io.InputStream getContentXML(String viewId) throws 
> Exception {
>        StringBuffer sb = new StringBuffer("<?xml version=\"1.0\"?>");
>        sb.append(getSitetreeAsXML());
>        //sb.append(getSitetreeAsXML(getPath().toString()));
>
>        return new java.io.StringBufferInputStream(sb.toString());
>    }
>
> by introducing a method
>
> boolean children = false;
> sb.append(getSitetreeAsXML(getPath().toString(), children));
>
> within
>
> src/contributions/resources/data-repo-sitetree/src/java/org/wyona/yanel/impl/resources/navigation/DataRepoSitetreeResource.java 
>
>
> and make the boolean children configurable via a request parameter, e.g.
this is what i did. just used a rc-property instead of request-parameter.
>
> http://127.0.0.1:8080/yanel/globus/yanel/data-repository-sitetree.html?path=/foo/bar&children=false 
>
>
> I don't think this has anything to do with the resource configuration, 
> except if you don't want to specifiy the children request parameter. 
> Or was that your intention?
yes my intention was to avoid using a request parameter. maybe it would 
make sense to allow both. request-parameter or rc-property.

simon
>
> Cheers
>
> Michi
>
>>>
>>> Or do I misunderstand something?
>>
>> i think, otherwise i misunderstand something.
>>
>> simon
>>
>>>
>>> Cheers
>>>
>>> Michi
>>>
>>>>
>>>> simon
>>>> _______________________________________________
>>>> Yanel-development mailing list
>>>> Yanel-development at wyona.com
>>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> Yanel-development mailing list
>> Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
>



More information about the Yanel-development mailing list