Click Framework  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: CLK-333
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Malcolm Edgar
Reporter: Ivan Furdi
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Click

AutoCompleteTextField cannot be added on form. Form cannot be submited.

Created: 11/Mar/08 08:12 PM   Updated: 16/Mar/08 07:52 AM
Component/s: core , extras
Affects Version/s: 1.4
Fix Version/s: 1.5 M1 , 1.4.1


 Description  « Hide
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).




 All   Comments   Change History      Sort Order:
Bob Schellink [12/Mar/08 02:06 AM]
Hi Ivan,

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();


Bob Schellink [12/Mar/08 02:42 AM]
Need to fix in 1.4.1 as well as 1.5.M1

Bob Schellink [16/Mar/08 07:52 AM]
fixed in trunk and backported to 1.4.1

Resolving issue for now. If there are further issues feel free reopen this issue or create a new one.