cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashel Shehata" <rashe...@gmail.com>
Subject repeater binding
Date Thu, 29 Mar 2007 05:21:26 GMT
Hey everyone,

im having problems binding my repeater widget so i attempted another method
to dynamically create repeater rows and fill it with values.
in the model file, i defined a repeater widget to be:


 <fd:repeater id="availability" orderable="true">
      <fd:widgets>

        <fd:output id="id">
          <fd:label>ID</fd:label>
          <fd:datatype base="integer"/>
        </fd:output>

        <fd:field id="label">
          <fd:label>label</fd:label>
          <fd:hint>label</fd:hint>
          <fd:datatype base="string"/>
        </fd:field>
      </fd:widgets>
    </fd:repeater>



and to dynamically fill it this what i have:



<fd:form
  id="data"
  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">

   <fd:on-create>
        <fd:javascript>
          var form = event.source.form;
var repeater = form.getChild("availability");
repeater.addRow();

repeater.getRow(0).getChild("label").setValue("test");

        </fd:javascript>
  </fd:on-create>



however this does nothing... any help



Regards

R

Mime
View raw message