You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Igor Drobiazko (JIRA)" <de...@tapestry.apache.org> on 2007/10/05 11:35:50 UTC

[jira] Updated: (TAPESTRY-1795) Suggest component throws js error: 'afterUpdateElement is not a function'

     [ https://issues.apache.org/jira/browse/TAPESTRY-1795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Drobiazko updated TAPESTRY-1795:
-------------------------------------

    Attachment: TAPESTRY-1795.patch

This patch fixes the issue in a pragmatical way by rewriting the existing js names in the parameter map with the values wrapped by JSONLiteral. A general solution (maybe for other components) is still needed.

> Suggest component throws js error: 'afterUpdateElement is not a function'
> -------------------------------------------------------------------------
>
>                 Key: TAPESTRY-1795
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1795
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.1.2
>            Reporter: Igor Drobiazko
>            Priority: Critical
>             Fix For: unspecified
>
>         Attachments: TAPESTRY-1795.patch
>
>
> It is not possible to define a client side javascript function to be called after the element has been updated.
> Something like: options=literal:{afterUpdateElement: myAfterUpdateElement} doesn't work because the method JSONObject#valueToString is always quoting all the elements of the json object. The output of the component is:
> var suggest = new Ajax.Autocompleter(......, ......,  {.....,"afterUpdateElement":"myAfterUpdateElement",......});
> But Ajax.Autocompleter expects a reference to a js function. Thats is the reason for the js error:
> this.options.afterUpdateElement is not a function
> [Break on this error] this.options.afterUpdateElement(this.element, selectedElement);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org