cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Slupik <barbara.slu...@ntlworld.com>
Subject Re: [2.2] Cforms, selection-list on Repeater
Date Fri, 20 Jun 2008 13:33:19 GMT
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&lt;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: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message