Hey everybody, I have an Ajax enabled form that is based on the car
selector example with some related drop down lists which are working
really well. I have an option in each drop down list to "add a new
item" which hides the drop down list, and replaces it with a text box
and submit/cancel buttons. These also work really well. There's also a
text area on the form, and whenever I try to style it as an HTMLArea
things start acting weird.
First when I choose the "add a new item" option from the select list it
uses AJAX to remove the list and show the addition form. However, when
I click either the "Save" or "Cancel" buttons it actually submits the
entire form (rewriting the location bar in the browser) and then only
works correctly about half the time. The other half of the time I get
this exception:
java.lang.IllegalStateException: Widget Action 'newClient.cancelClient'
that submitted the form is not active.
Cocoon stacktrace[hide]
*Error calling continuation
*file:/home/jgreen/workspace/timetrack/build/timetracktest/timetrack/resources/forms/flow/javascript/Form.js
- 171:-1
file:/home/jgreen/workspace/timetrack/build/timetracktest/timetrack/resources/forms/flow/javascript/Form.js
- 0:-1
file:/home/jgreen/workspace/timetrack/build/timetracktest/timetrack/flow/timetrack.js
- 0:-1
file:/home/jgreen/workspace/timetrack/build/timetracktest/timetrack/resources/forms/flow/javascript/Form.js
- 0:-1
file:/home/jgreen/workspace/timetrack/build/timetracktest/timetrack/timetrack.auth.sitemap.xmap
- 273:37
file:/home/jgreen/workspace/timetrack/build/timetracktest/timetrack/sitemap.xmap
- 300:88
file:/home/jgreen/workspace/timetrack/build/timetracktest/sitemap.xmap -
303:71
I added some debugging to Forms.js and discovered that the root of the
problem seems to be that sometimes the form is somehow submitted twice.
This only ever happens when using the htmlarea styling. I was wondering
if anyone else has seen a similar problem and knows a way around it.
Thanks,
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]