You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alessandro Vincelli <av...@alessandro.vincelli.name> on 2008/06/20 10:24:18 UTC

[2.2] Cforms, selection-list on Repeater

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


Re: [2.2] Cforms, selection-list on Repeater

Posted by Barbara Slupik <ba...@ntlworld.com>.
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