Hi,

Im having a problem setting the state of a certain child of a repeater .

I have a simple repeater defined as:

 <fd:repeater id="selection"  >
 <fd:widgets>

 <fd:field id="response" required="true" state="disabled">
         <fd:label>Response Label</fd:label>
         <fd:datatype base="string"/>
       </fd:field>
..other children
</fd:widgets>
 </fd:repeater>


Initially the response child is disabled but at some point i want to
activate all instances of the response child in the repeater

I have tried:
widget.lookupWidget("../selection").getChild("response").state=
Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE;

but i get an error:
TypeError: Cannot set property "state" of null

i get the same error using widget.lookupWidget
("../selection").lookupWidget("response").

However on trying the method, the response widget is activated for row 0(as
expected):
  widget.lookupWidget("../selection").getWidget(0,"response").state=
Packages.org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE;

how do i activate all instances of the response widget in the repeater.
Thanks a miilion

Reply via email to