You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alexey Mukas (JIRA)" <ji...@apache.org> on 2013/04/12 10:45:31 UTC

[jira] [Created] (WICKET-5142) Generating invalid JavaScript for ajax update

Alexey Mukas created WICKET-5142:
------------------------------------

             Summary: 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


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