Hi all,

 

I'm back again with a problem ;-)   When adding the attribute
submit-on-change to a field widget (in a repeater) I see that the final
html gets added the following onchange attribute :
onchange="cocoon.forms.submitForm(this)".  

 

Somehow cocoon.forms is undefined.  Can anybody give me some insight as
to what could be wrong....  This would be mostly appreciated.

 

Thx in advance,

Robby Pelssers

 

Below relevant snippets:

 

Formdefinition:

 

<?xml version="1.0" encoding="UTF-8"?>

<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition";>

  <fd:widgets>

    <fd:repeater id="properties">

      <fd:widgets>

        <fd:field id="propertyName" state="output">

                  <fd:datatype base="string"/>          

        </fd:field>

        <fd:field id="datatype" state="output">

                  <fd:datatype base="string"/>

        </fd:field>

        <fd:field id="operator">

                  <fd:datatype base="string"/>


        </fd:field>

      </fd:widgets>

    </fd:repeater>

  </fd:widgets>

</fd:form>

 

Template:

    <ft:form action="#{$cocoon/continuation/id}.continue" method="POST"
>            

      <ft:repeater id="properties">

        <table>

          <tbody>

            <ft:repeater-rows>

              <tr>

                <td>

                  <ft:widget id="propertyName"/>

                </td>

                <td>

                  <ft:widget id="datatype"/>

                </td>

                <td>

                  <ft:widget id="operator">

                    <fi:styling list-type="dropdown"
submit-on-change="true"/>

                  </ft:widget>

                </td>                        

              </tr>

            </ft:repeater-rows>       

          </tbody>

        </table>

      </ft:repeater>

      <br/>

      <input type="submit" value="Search"/>

    </ft:form>

 

 

Generated html output:

 

<td>

  <span id="properties.0.operator">

    <select name="properties.0.operator"
id="properties.0.operator:input" title="" class="forms field active"
onchange="cocoon.forms.submitForm(this)">

      <option value="" />

      <option value="EQUALS">=</option>

      <option value="IS_NULL">is null</option>

      <option value="IS_EMPTY">is empty</option>

      <option value="CONTAINS">contains</option>

    </select>

  </span>

</td>

 

 

 

 

 

Reply via email to