cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Submitting form in onchange event
Date Fri, 16 Jan 2004 16:16:20 GMT
Upayavira wrote:

> Joerg Heinicke wrote:
>> On 15.01.2004 23:34, Upayavira wrote:
>>> I'd like to have an on-change event actually submit the form, rather 
>>> than just execute the <wd:on-value-changed> javascript code.
>>> How can I do this?
>>> Otherwise, the on-value-changed javascript doesn't have access to 
>>> the local variables of the main flowscript, which I need to 
>>> repopulate my form for redisplay. (I know I can get hold of the 
>>> bizObject from the request attribute, but it all seems rather hard 
>>> work to use it there. There's an elegance I'm missing).
>> You changed the woody stylesheet for the radio buttons, so you 
>> already came across @submit-on-change. Why not using the same for a 
>> field?
> Because it goes back to the server, yes, but doesn't actually leave 
> the showForm function, which is what I'm after.

Currently, the only widgets that can potentially automatically exit 
showForm are <wd:submit> widgets. "Potentially" since of course the form 
is redisplayed if validation is asked and fails.

The Form object has a endProcessing(boolean redisplayForm) method that 
could be use in the <wd:on-value-change> to achieve this.

Sylvain (currently swamped)

Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message