You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Stephane Delort <St...@edag.de> on 2004/08/10 10:31:27 UTC

[Cforms] setting repeater's selection list in flowscript

Hi,

I have a repeater including a selection list.
I would like to have a lot of selection lists buitl according to java
objects I have in the sitemap.

I cannot use jxpath as far as I do not know the number of lists I will
have.

here is a snippet of what I would like to do :


 -------------Cforms definition :

<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
         xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
  <fd:widgets>
  <fd:repeater id="lists">
    <fd:widgets>
      <fd:multivaluefield id="list" required="true">
        <fd:label>just another List </fd:label>
        <fd:datatype base="string"/>
          <fd:selection-list />
        </fd:multivaluefield>
      </fd:widgets>
    </fd:repeater>
  </fd:widgets>
</fd:form>

------------ flowscript :
,,,

  var form = new Form("forms/input2_mask1.xml" );
  var model = form.getModel();
  var row = model.lists.addRow();
  row1.list=["riri", "fifi", "loulou"];
  form.showForm("input2_mask1-display-pipeline");

The result of this code is that the function addRow does not exist (but
according to the API it does).

Any idea ?

Regards,
Stephane




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