This is a special syntax of wicket : http://wicketinaction.com/2013/02/replace-components-with-animation/
Anybody can't help me ? -- Olivier Dutrieux Groupe Projets (Tél : 31 62) > -----Message d'origine----- > De : Tobias Soloschenko [mailto:tobiassolosche...@googlemail.com] > Envoyé : dimanche 1 octobre 2017 00:35 > À : users@wicket.apache.org > Objet : Re: PrependJavaScript to replace a composant with animation > > Hi, > > are you able to try to replace this by a normal if block: > > ......format("notify|var...... > > Seems that this shortcut is causing the issue. > > kind regards > > Tobias > > > Am 30.09.2017 um 23:21 schrieb Olivier DUTRIEUX > <olivier.dutri...@pasteur.fr>: > > > > Hello, > > > > I use the functionnality of prependJavaScript to replace a composant with > animation, but I have I a problem when I have two functions (on difference > composants), one with normal syntax like this : > > > > target.prependJavaScript("$('" + c.getMarkupId() + > "').selectpicker('destroy')"); > > > > and I other one with special syntax for animation : > > > > target.prependJavaScript(String.format("notify|var > c=$('#%s.collapse');if(c.length){c.on('hidden.bs.collapse',function(){notify();} > );c.collapse('hide');}else{notify();}", c.getMarkupId())); > > > > I get a error when wicket evaluate the javascript : > > > > ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: > SyntaxError: expected expression, got keyword 'var', text: > (function(){$('#identifiedPerson17f').selectpicker('destroy');})();(function(){n > otify|var > c=$('#identifiedPersonContainer161.collapse');if(c.length){c.on('hidden.bs.co > llapse',function(){notify();});c.collapse('hide');}else{notify();}})(); > > > > Thanks advance for your help > > > > Duto > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org