[
https://issues.apache.org/jira/browse/WICKET-5142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov resolved WICKET-5142.
-------------------------------------
Resolution: Fixed
Fix Version/s: 6.8.0
Improved the code by splitting the text with all-functions-in-one in <evaluate>
element to separate functions which are executed one by one and each of them
can execute 'notify' manually.
> Generating invalid JavaScript for ajax update
> ---------------------------------------------
>
> Key: WICKET-5142
> URL: https://issues.apache.org/jira/browse/WICKET-5142
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Reporter: Alexey Mukas
> Assignee: Martin Grigorov
> Fix For: 6.8.0
>
> Attachments: myproject.zip
>
>
> Suppose I have BlinkBehaviour
> public static class BlinkBehaviour extends Behavior {
> @Override
> public void renderHead(Component component, IHeaderResponse response)
> {
> AjaxRequestTarget target =
> component.getRequestCycle().find(AjaxRequestTarget.class);
> if (target != null) {
> target.prependJavaScript("notify|jQuery('#" +
> component.getMarkupId() + "').fadeOut(400, notify);");
>
> target.appendJavaScript("jQuery('#"+component.getMarkupId()+"').fadeIn(400);");
>
> }
> }
> }
> If I add it twice to a control and update the control via ajax 6.7.0-SNAPSHOT
> will yield error:
> ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript:
> SyntaxError: Unexpected token ), text: f = function(notify)
> {jQuery('#version2').fadeOut(400,
> notify);})();(function(){notify|jQuery('#version2').fadeOut(400, notify);};
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira