Barbara thank you for the suggestion,
I resolve with the code below:
f.load(fb);
int size = f.getProfiles().getRepeater().getSize();
for (int i = 0; i < size; i++) {
RepeaterRow rr =
(RepeaterRow)f.getProfiles().getRepeater().getRow(i);
((Field)rr.lookupWidget("profile")).setSelectionList(fb.getProfileSL()
, "upId", "upName");
}
Ciao
Alessandro
----- Original Message -----
Da : Barbara Slupik <[EMAIL PROTECTED]>
A : [email protected]
Oggetto : Re: [2.2] Cforms, selection-list on Repeater
Data : Fri, 20 Jun 2008 14:33:19 +0100
> I think you need to get to the repeater row to access your
> widget. Perhaps something like this will work:
>
> var profiles=form.lookupWidget("profiles");
> for (var i=0; i<profiles.size; i++) {
> var row=profiles.getRow(i);
> var profile=row.lookupWidget("profile").value;
> }
>
> Barbara
>
>
> On 20 Jun, 2008, at 9:24 am, Alessandro Vincelli wrote:
>
> >
> > I'm using cocoon 2.2. In CForms 1.1 the selection-list
> > of type flow-jxpath doesn't work.
> >
> > <fd:repeater id="profiles">
> > <fd:widgets>
> > <fd:field id="profile">
> > <fd:label>Profile</fd:label>
> > <fd:datatype base="integer" />
> > <fd:selection-list type="flow-jxpath"
> > list-path="profileSL" value-path="upId"
> > label-path="upName" />
> > </fd:field>
> > </fd:widgets>
> > </fd:repeater>
> >
> > In alternative, I'm trying to use the method
> > "setSelectionList" on Field Object, but i can't acces to
> > this widget inside the repeater.
> > For example this code doesn't work:
> > form.lookupWidget("profiles").lookupWidget("profile")
> >
> > I read the api, but I can't understand how to access on
> > the widget inside the repeater, before the creation of
> > the RepeaterRows.
> >
> > Any suggestions?
> > thanks in advance
> > Alessandro
> >
> >
> ----------------------------------------------------------
> > ----------- To unsubscribe, e-mail:
> > [EMAIL PROTECTED] For additional
> commands, e-mail: [EMAIL PROTECTED] >
>
>
> ----------------------------------------------------------
> ----------- To unsubscribe, e-mail:
> [EMAIL PROTECTED] For additional
> commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]