Hi Sebastien, Wouldn't it be possible to achieve the same with a hidden div?
On Sat, Feb 16, 2013 at 12:39 PM, Sebastien <[email protected]> wrote: > Dear Wicket's dev team, > > A user of wicket-jquery-ui, reported me an issue which is related to an > ajax inline javascript header contribution (when src attribute is not set) > https://github.com/sebfz1/wicket-jquery-ui/issues/20 > > In wicket-ajax-jquery.js, #processScript assume that an inline script > should be added using Wicket.Head.addJavascript (in opposition to > Wicket.Head.addElement > for outline script) > The problem is that #addJavascript modifies the script content in any > case (content > = 'try{'+content+'}catch(e){Wicket.Log.error(e);}';), but a script element > does not necessary contains content that is designed to be executed, that > the case of a jQuery Template for instance where the tag signature look > like <script id="jquery-template-116997860" type="text/x-jquery-tmpl"> > > I think that #processScript should ensure that the mime type is > 'text/javascript' before calling #addJavascript. If the mime type is > different, #addElement should be called rather than #addJavascript > Another option - if you want to prevent potential issues for user not > specifying the script's mime type - could be to bypass scripts (means not > calling #addJavascript but #addElement) having their mime type starting > with "text/x-", which is a convention for custom script type. > > Would you like me to open a jira ? > > Thanks in advance, > Sebastien. > -- Regards - Ernesto Reinaldo Barreiro Antilia Soft http://antiliasoft.com/ <http://antiliasoft.com/antilia>
