David Leangen wrote:

Hello!

I'm having a bit of trouble with event handling in CForms.

What is the element that I'm missing that will trigger a page update? I
can't seem to figure that out...



This is the function in my flow controller:

function showLimitsForm()
{
   var form = new Form("limits.xml");
   form.lookupWidget("age").setValue(cocoon.parameters.defaultAge);
   form.showForm("limits-display-pipeline");
   cocoon.request.setAttribute("ageselectorform", form.getWidget());
   cocoon.sendPage("limits-success-pipeline.jx", bizdata);
}


This is an excerpt of my form 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:field id="age">
     <fd:label>Age</fd:label>
     <fd:datatype base="string"/>
     <fd:selection-list src="cocoon:/age" dynamic="true"/>
     <fd:on-value-changed>
       <javascript>
         var thisWidget = event.source;

         ...
         ...


(Is it even necessary to use 'src="cocoon:/age"'? The contents of the list are not dynamic.)


This is an excerpt from my template file:


<ft:widget id="age"> <fi:styling list-type="radio" submit-on-change="true"/> </ft:widget>


However, when I change the value of the "age" radio, no event is being triggered...


Any ideas?



Do you have a widget that is named "submit"? If yes, it overrides the submit() function of the form object in the web page, and therefore breaks the client-side handling of "submit-on-change".


Sylvain

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to