Hi Marco,

AutoCompleteField uses the template jquery.autocomplete.template.js. If you look at the template you'll notice that it already uses the extraParams property to send the field ID parameter to the server. If you specify extraParams it overrides the default value and Click cannot figure out which field sent the request.

To fix this we'll need to "append" extraParams instead of replace them.

For now you can work around this by specifying your extraParams as follows:

  setOptions("extraParams: {" + completeField.getId() + ":1, <add custom params 
here>}");

kind regards

bob

On 16/02/2010 11:41 PM, Marco Gattei wrote:
Hi everyone ,

i'm trying to play with Jquery AutoCompleteField from wobnderful
clickclick project ....
What i'm trying to do is submit extra params to the server when
requesting the list for autocomplete field.
(i.e. i choose state first, then autosuggest city that are only in that
state ).
Jquery autocomplete plugin has a nice feature that allow to define extra
params to send with the ajax request for autocomplete.

http://docs.jquery.com/Plugins/Autocomplete#Dependencies_between_fields.

I tried it, but when i set this particular option, the server method for
getting suggestion list doesn't get invoked !!!!
Removing the option from jquery $('selector').autocomplete( url ,
options ) gets  JQAutoCompleteField  to work again.

I tried to sniff HTTP dialog between client and server and i noticed
that where JQuery autocomplete with extraParam options on,
request to the server are made whit type='application/xml' .
When  extraParam is off, request type = 'text/plain'.
It seems like when request type of the ajax request is not text/plain,
Click isn't able to invoke the JQAutoCompleteFiled listener.

As someone any idea ?

Is that a Click or a JQuery iussue ?

--
Marco

Reply via email to