Hi Sebastian,

thanks for your help.

the reason for this error seems that I load jquery-1.11.2.min.js in wicket head 
next to jQuery-1.11.1 which is already loaded via wicket.

However, when I restrain from loading jquery-1.11.2.min.js in wicket head , the 
javascript $(function () {…} is not called although jQuery-1.11.1 seems to be 
loaded (via wicket).

Why does this happen?

Thanks Chris


> Am 26.04.2015 um 18:02 schrieb Sebastien <seb...@gmail.com>:
> 
> Hi Chris,
> 
> AFAIS, the only thing that I think it could typically cause an issue is
> "calcHeight()". But the error message is misleading, I would have expect a
> "calcHeight is undefined" instead, so I am not really sure... Furthermore,
> I don't know how/where you have included the "calcHeight" function. If the
> scope is window then try window.calcHeight();
> 
> If it does not solve the issue or you suspect it comes from elsewhere
> please create a minimal quickstart that reproduce the issue and I will have
> a look...
> 
> Thanks & best regards,
> Sebastien.
> 
> (function(){Wicket.Ajax.ajax({"sc":"voteup","c":"voteup47","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup","e":"click","f":"form46","m":"POST"});})();
> (function(){Wicket.Ajax.ajax({"sc":"votedown","c":"votedown48","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown","e":"click","f":"form46","m":"POST"});})();
> (function(){Wicket.Ajax.ajax({"c":"thumbTitleLink49","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink","e":"click"});})();
> (function(){Wicket.Ajax.ajax({"c":"remove4a","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove","e":"click"});})();
> (function(){Wicket.Ajax.ajax({"c":"position4b","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position","e":"click"});})();
> (function(){Wicket.Ajax.ajax({"c":"poiItem4c","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem","e":"click"});})();
> (function(){Wicket.Ajax.ajax({"sc":"voteup","c":"voteupab","u":"./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup","e":"click","f":"formaa","m":"POST"});})();
> (function(){Wicket.Ajax.ajax({"sc":"votedown","c":"votedownac","u":"./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown","e":"click","f":"formaa","m":"POST"});})();
> (function(){Wicket.Ajax.ajax({"c":"shuffleae","u":"./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle","e":"click"});})();
> 
> (function(){ calcHeight();})();
> 
> (function(){Wicket.Ajax.ajax({"c":"deleteAll","u":"./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll","e":"click"});})();
> 
> (function(){
>    jQuery('#sortable2c').sortable({
>    "update": function (event,ui) {
> 
>        var attrs =
> {"c":"sortable2c","u":"./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable"};
>        var params = {'hash': ui.item.data('hash'),'index':
> ui.item.index()};
>        attrs.ep = params;
>        Wicket.Ajax.ajax(attrs);
>        }
>        , "handle": ".handle" });
> })();
> 
> (function(){
>    jQuery('#sortable2c').selectable({
>        "cancel": "span", "filter": "li", "stop": function () {
> 
>            var indexes=[]; jQuery('.ui-selected', this).each( function() {
>            indexes.push(jQuery('#sortable2c li').index(this)); } );
>            var attrs =
> {"c":"sortable2c","u":"./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable"};
>            var params = {'indexes': indexes};
>            attrs.ep = params;
>            Wicket.Ajax.ajax(attrs);
>        }
>    });
> 
> })();
> 
> On Sun, Apr 26, 2015 at 2:08 AM, Chris <chris...@gmx.at> wrote:
> 
>> Hi Sebastian,
>> 
>> I would like to render the container with the sortable items based on a
>> Wicket event:
>> 
>> @Override
>>    public void onEvent(IEvent<?> event) {
>>        super.onEvent(event);
>> 
>>        if (event.getPayload() instanceof AddItem) {
>>            ....
>>            update.getTarget().add(container);
>>        }
>> }
>> 
>> Thereby, I am getting following error. Has this something to do that some
>> JS file has to be referenced in the panel instead of page?
>> 
>> Thanks a lot,
>> Chris
>> 
>> ERROR: Wicket.Ajax.Call.processEvaluation: Exception evaluating
>> javascript: TypeError: undefined is not a function (evaluating
>> 'jQuery('#sortable2c').sortable'), text:
>> (function(){Wicket.Ajax.ajax({"sc":"voteup","c":"voteup47","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-voteup","e":"click","f":"form46","m":"POST"});})();(function(){Wicket.Ajax.ajax({"sc":"votedown","c":"votedown48","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-voting-form-votedown","e":"click","f":"form46","m":"POST"});})();(function(){Wicket.Ajax.ajax({"c":"thumbTitleLink49","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-thumbTitleLink","e":"click"});})();(function(){Wicket.Ajax.ajax({"c":"remove4a","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-remove","e":"click"});})();(function(){Wicket.Ajax.ajax({"c":"position4b","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem-position","e":"click"});})();(function(){Wicket.Ajax.ajax({"c":"poiItem4c","u":"./rec?2-1.IBehaviorListener.0-poiList-poiItems-3-poiItemPanel-poiItem","e":"click"});})();(function(){Wicket.Ajax.ajax({"sc":"voteup","c":"voteupab","u":"./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-voteup","e":"click","f":"formaa","m":"POST"});})();(function(){Wicket.Ajax.ajax({"sc":"votedown","c":"votedownac","u":"./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-voting-form-votedown","e":"click","f":"formaa","m":"POST"});})();(function(){Wicket.Ajax.ajax({"c":"shuffleae","u":"./rec?2-1.IBehaviorListener.0-rightPanel-poiDetail-flickrGallery-shuffle","e":"click"});})();(function(){calcHeight();})();(function(){Wicket.Ajax.ajax({"c":"deleteAll","u":"./rec?2-1.IBehaviorListener.0-suitcasePanel-container-deleteAll","e":"click"});})();(function(){jQuery('#sortable2c').sortable({
>> "update": function (event,ui) {
>> var attrs =
>> {"c":"sortable2c","u":"./rec?2-1.IBehaviorListener.0-suitcasePanel-container-sortable"};
>> var params = {'hash': ui.item.data('hash'),'index': ui.item.index()};
>> attrs.ep = params;
>> Wicket.Ajax.ajax(attrs);
>> }
>> , "handle": ".handle"
>> });})();(function(){jQuery('#sortable2c').selectable({ "cancel": "span",
>> "filter": "li", "stop": function () {
>> var indexes=[]; jQuery('.ui-selected', this).each( function() {
>> indexes.push(jQuery('#sortable2c li').index(this)); } ); var attrs =
>> {"c":"sortable2c","u":"./rec?2-1.IBehaviorListener.1-suitcasePanel-container-sortable"};
>> var params = {'indexes': indexes};
>> attrs.ep = params;
>> Wicket.Ajax.ajax(attrs);
>> }
>> });})();
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to