
|
If you were logged in you would be able to see more operations.
|
|
|
|
When one is trying to use AutoCompleteTextField field on a form
or a FieldSet which is added to the form then submitting a form is not possible.
Possible problem is in double post validation, that is - first you submit form with auto complete field and if you try to submit with submit button afterwards, submission fails (method form.onSubmitCheck(this, pagePath) returns false).
|
|
Description
|
When one is trying to use AutoCompleteTextField field on a form
or a FieldSet which is added to the form then submitting a form is not possible.
Possible problem is in double post validation, that is - first you submit form with auto complete field and if you try to submit with submit button afterwards, submission fails (method form.onSubmitCheck(this, pagePath) returns false).
|
Show » |
|
|
Thanks your analysis is correct. The Ajax call to the server seems like a normal form submit and Click regenerates a different double post token.
To solve this we need a more robust check for Ajax callbacks.
Doing some research there is the de-facto standard header : "X-Requested-With: XMLHttpRequest" supported by Prototype, JQuery, Mootools, YUI, MockiKit, Dojo 1.1.
Rico is included in this list since its built on Prototype.
Here are some articles for those interested:
http://www.dev411.com/blog/2006/06/30/should-there-be-a-xmlhttprequest-user-agent
http://raphaelstolt.blogspot.com/2007/03/using-plugin-system-of-zend-framework.html
Please note that there is an ajax "standards" organization; http://www.openajax.org/index.php which might standardize on another header.
If users want to use a Ajax lib which does not support this header, its usually easy enough to hack javascript ;-)
Implementation wise we could do Context#isAjaxRequest();