[Yanel-dev] DataRepoSitetreeResource and lazy loading

Michael Wechner michael.wechner at wyona.com
Mon Apr 21 11:18:55 CEST 2008


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.

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?

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



-- 
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list