Hello,

I have time to check this problem :

The problem is that the regexp "scriptWithIdentifierR" tests that the 
javascript is in form of *start with* "identifier|code" or my javascript don't 
start with "identifier|code" because is :

(function(){$('#var1').selectpicker('destroy');})();(function(){notify|var 
c=$('#var2.collapse');if(c.length){c.on('hidden.bs.collapse',function(){notify();});c.collapse('hide');}else{notify();}})();

There is 2 functions : the first is a normal function but the second is 
"identifier|code" function.

If I change the var "scriptWithIdentifierR" (https://tinyurl.com/y8r24b5m) to :

new RegExp("\\(function\\(\\)\\{([a-zA-Z_]\\w*)\\|((.|\\n)*)?\\}\\)\\(\\);$");

without the ^ of the first caractere that work nicely.


-- 
Duto


> -----Message d'origine-----
> De : Martin Grigorov [mailto:[email protected]]
> Envoyé : mercredi 4 octobre 2017 10:13
> À : [email protected]
> Objet : Re: PrependJavaScript to replace a composant with animation
> 
> Hi,
> 
> Put a breakpoint inside processEvaluation() method [1] and see what goes
> wrong.
> 
> 
> 1.
> https://github.com/apache/wicket/blob/58a7106d74de02cc9f193d95613b6c1
> f3483ca7b/wicket-
> core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-
> jquery.js#L1158
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov

Reply via email to