How to build TreeViewModel using following sample xml ?

Sample xml :
 <List>
        <employee>
            <EmployeeId>111</EmployeeId>
            <ReportsTo>1</ReportsTo>
            <Name>Thomas</Name>
        </employee>
        <employee>
            <EmployeeId>222</EmployeeId>
            <ReportsTo>111</ReportsTo>
            <Name>Vaibhav</Name>
        </employee>
</List>


public class MyTreeViewModel implements TreeViewModel {
        @Override
        public <T> NodeInfo<?> getNodeInfo(T value) {
           // ????
                return null;
        }

        @Override
        public boolean isLeaf(Object value) {
           /// ????
                return false;
        }
}

How to perform sorting & filtering based on MyTreeViewModel ?


On Apr 5, 3:25 pm, Thomas Broyer <[email protected]> wrote:
> On Thursday, April 5, 2012 12:10:42 PM UTC+2, vaibhav gwt wrote:
>
> > @ Data_Binding : From server side we are passing xml to client side.
> > Is there any way to bind that xml data to CellTree so that all data
> > populated/render in CellTree (In Tree format)
> > like.. In smartGwt
> >http://www.smartclient.com/smartgwt/showcase/#featured_tree_grid
> > ==> Source code ==>see EmployeeXmlDS.java # Created data source set to
> > TreeGrid
> > #1 Create dataSource : specify dataUrl (data in xml format) &
> > setRecordXPath etc.. and set created DataSource in TreeGrid
>
> > BUT I dont want to use SmartGwt ( :( Its not free) . I want to use
> > GWT.
>
> > In GWT,:  How to populate a CellTree with xml data which is coming
> > from server side
> > From server side we are passing xml to client side. Is there any way
> > to bind that xml data to CellTree so that all data populated/render in
> > CellTree (In Tree format)
>
> You have to build a TreeViewModel around your XML data.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to