Hi,

Although I can subclass Autocomplete and implement the configure(JSONObject)
method to specify an afterUpdateElement, the fuction I specify (as a String
here) gets surrounded by double-quotes by JSONObject.toString()

Thus it is not interpreted as a function.  It would be nice if I could use
some object, JavascriptFunction for example, which would not be quoted by
toString().

protected void configure(JSONObject config) {
  config.put("afterUpdateElement", "function (element, selectedElement)
{element.blur();}");
}

results in the following script:

new Ajax.Autocompleter(xxx, xxx:menu', '/xxx/xxx:autocomplete',
{"indicator":"xxx:loader","afterUpdateElement":"function (element,
selectedElement) {element.blur();}","paramName":"t:input"});

Should I create a JIRA issue for this?

Regards,

Paudi

Reply via email to