On Tue, 2003-10-28 at 15:28, Olivier Billard wrote:
> Hi Nicolas !
> 
> The following code should work, to browse your
> 
> Repeater transform = (Repeater)form.getWidget().getWidget("transform");
> for (var i=0 ; i<transform.getSize() ; i++) {
>      Field searchField = (Field) transform.getWidget(i, "search");
> ... do something with your widget...
> }

the above looks like a mix of Java and Javascript code (var in Java?
typecasts in Javascript?).

If it's flowscript you're using, have a look at woody_flow_example.js
for a more Javascript-like way of doing it:

var model = form.getModel();
var value = model.transform[0].search;

> 
> --
> Olivier Billard
> 
> On 28/10/2003 14:42, Nicolas Maisonneuve wrote:
> 
> > hy,
> > my model is :
> > <wd:field id="index">
> >     <wd:label>Index :</wd:label>
> >     <wd:datatype base="string"/>
> >     <wd:selection-list src="cocoon:/list?list=index" dynamic="true"/>
> >     <wd:on-value-changed>
> >         <javascript>
> >         var value = event.source.value;
> >          /* var searchwidget= something to access to my searchwidget in 
> > the repeater  */
> >          
> > searchwidget.setSelectionList("cocoon:/list?list=search&amp;index=" + 
> > value);
> >        </javascript>
> >     </wd:on-value-changed>
> >  
> >  </wd:field>
> >  
> >  <wd:repeater id="transform">
> >  
> >   <wd:field id="search" required="true">
> >       <wd:label>Search field:</wd:label>
> >       <wd:datatype base="string"/>
> >       <wd:selection-list/>
> >    </wd:field>
> >  </wd:repeater>
> >  
> > how acess to my searchfield ?
> 

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to