Timothy Larson wrote:

In the first Woody sample, "Various", if you:
 (1) Change the value in the first number field, "Please enter a number"
 (2) Then press "Add contact" or "Remove selected contacts" *before* tabbing or 
clicking into any other field.
Then you will receive an error page with this message:
 java.lang.IllegalStateException: SubmitWidget can only be set once.

It is caused by two widgets submitting at once, specifically the action button that is pressed and the action attached to the first number field. The number's action is delayed until editing is complete, which is noticed when leaving the field. In this case, leaving the field happens at the same time as clicking on an action button.

How should we handle this case?



Mmmh... the onchange() handler on the input registers the input name in the hidden woody_submit_id field, and the action button's name is also passed as a request parameter, leading to this double detection.


A solution would be to set the woody_submit_id field also on a regular submit button, but which one would win: the button or the input? Is this predictable?

Sylvain

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




Reply via email to