cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Problems with event handling in CForms
Date Mon, 06 Dec 2004 12:31:50 GMT
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message