cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: Tree widget example broken (was Re: svn commit: r289538)
Date Wed, 21 Sep 2005 15:38:12 GMT
El mar, 20-09-2005 a las 17:38 +0200, Sylvain Wallez escribió: 
> Thorsten Scherler wrote:
> >That is working fine. :) Very good stuff.
> >
> >Any hints how I can implement the binding?
> >  
> >
> The tree widget currently doesn't have child widgets, so binding it 
> doesn't really make sense.

It does not provide child widgets in the cforms definition but IMO each
node of the tree is an option. The file explorer example shows that
quite nice. You can select nodes and the selected nodes are stored in
the message, right?

Now one way to have a binding example is to not use the message wigdet
but another widget where we store the selected option. Please have a
look at

>>From there I would like to change the filesOption.setValue(...) in:
 } else {
   messages.setValue(count + " files selected");
   filesOption.setValue(count + " files selected");

to an array that is storing the "files.selectionPath" for all selected
files. From there we can extracted it in the binding again. Does that
makes sense?

I am still looking into a way how to get the selection to an array. Can
you point me to information about getting the event.source.selection
into an array?

> What you should take a lot at though, is the TreeModel which is what 
> should be provided by the application to fill the tree.

I looked at the $Sample and actually I am planning to use it in lenya to
read in the sitetree.xml of a publication. I reckon I just need some
small modifications. 

> Sylvain

Thanks again.

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message