Re: Ajax channel busy
:) You could try to write some unit test, with rhino, it should be "fairly" simple.. Just wriite a junit test that executes a rhino test which in turn parses your js.. :) As someone mentioned to me once, "In java you can always add a new layer of abstraction" :) 2010/7/5 David Leangen > > Ok, this is fun. It was due to an error in my script. > > I've been doing Java for so many years that I forgot how to use a dynamic > language. I guess I'm too used to having the compiler tell me how much of an > idiot I am so I have less pain at runtime. ;-) > > > BTW, for you experts in js, is there any kind of compiler or validator or > something that you use to help locate errors? Or do you just play around > with things at runtime? Or are you just smarter than me and don't make so > many typos? > > > Cheers, > =David > > > On Jul 5, 2010, at 3:19 AM, nino martinez wael wrote: > > > Yeah it does seems as a problem.. what if you try putting in dummy > functions > > with alerts in them? > > > > 2010/7/3 David Leangen > > > >> > >> Ok, thanks, > >> > >> So, if it should be ok, I wonder why after the first execution, I only > get > >> > >> INFO: Channel busy - postponing... > >> > >> So I can't use my component more than once... > >> > >> > >> > >> > >> > >> > >> On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: > >> > >> Should be ok I guess, heres the definition of it, ..: > >>> > >>> function wicketAjaxGet(url, successHandler, failureHandler, > precondition) > >>> > >>> > >>> > >>> > >>> 2010/7/3 David Leangen > >>> > >>> > I should add that in my onCloseHandler, I have this in my js: > > $('#popup #popup-close-link').click(function (e) > { > e.preventDefault(); > $('#popup-mask, #popup-window').hide(); > if( url != "" ) > wicketAjaxGet(url, null, null, null); > }); > > As far as I can tell, this seems to be the correct use of > wicketAjaxGet... > > > Cheers, > =David > > > > > On Jul 3, 2010, at 4:22 PM, David Leangen wrote: > > > Hello, Wicketeers, > > > > I have a link that is supposed to call a JQuery component called > > "popup". > > > > final AjaxLink popupLink = new AjaxLink( "link.popup" ) > > { > > @Override > > public void onClick( AjaxRequestTarget target ) > > { > > target.addComponent( popup ); > > final StringBuilder s = new StringBuilder(); > > s.append( "$.fn.popup({" ) > > .append( "url: \"" ).append( > onCloseBehavior.getCallbackUrl() > > ).append( "\"" ) > > .append( "});" ); > > target.appendJavascript( s.toString() ); > > } > > }; > > > > Works just fine the first time, but each subsequent call, I can see > the > > following message in the Ajax Debug Window: > > > > INFO: Channel busy - postponing... > > > > > > Other than the link above, nothing else is going on! > > > > Do I need to somehow close the channel, or something? > > > > > > Thanks! > > =David > > > > > > - > > 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 > > > > >> > >> - > >> 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 > >
Re: Ajax channel busy
Hi, Chris, I tend to agree with you, that's why I prefer Java over Javascript. However, I need to write a few components, so I'm wondering what others do to help them avoid these types of errors that would normally be caught at compile time. Cheers, =David On Jul 5, 2010, at 6:41 PM, Chris Colman wrote: Ok, this is fun. It was due to an error in my script. I've been doing Java for so many years that I forgot how to use a dynamic language. I guess I'm too used to having the compiler tell me how much of an idiot I am so I have less pain at runtime. ;-) Humans aren't perfect - that's why humans invented typesafe languages! :) BTW, for you experts in js, is there any kind of compiler or validator or something that you use to help locate errors? Or do you just play around with things at runtime? Or are you just smarter than me and don't make so many typos? Not wanting to start a flame war with the dynamic language advocates... Given the complexity of software development I find it amazing that the 'non typesafe language' advocates are so willing to give up one of the best 'error avoidance mechanims' known to the programming world over the last 3 decades. Much better I find a bug at compile time than have it slip through testing and then have customers find it at run time ... But that's my personal opinion and others are free to have theirs' Cheers, =David On Jul 5, 2010, at 3:19 AM, nino martinez wael wrote: Yeah it does seems as a problem.. what if you try putting in dummy functions with alerts in them? 2010/7/3 David Leangen Ok, thanks, So, if it should be ok, I wonder why after the first execution, I only get INFO: Channel busy - postponing... So I can't use my component more than once... On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: Should be ok I guess, heres the definition of it, ..: function wicketAjaxGet(url, successHandler, failureHandler, precondition) 2010/7/3 David Leangen I should add that in my onCloseHandler, I have this in my js: $('#popup #popup-close-link').click(function (e) { e.preventDefault(); $('#popup-mask, #popup-window').hide(); if( url != "" ) wicketAjaxGet(url, null, null, null); }); As far as I can tell, this seems to be the correct use of wicketAjaxGet... Cheers, =David On Jul 3, 2010, at 4:22 PM, David Leangen wrote: Hello, Wicketeers, I have a link that is supposed to call a JQuery component called "popup". final AjaxLink popupLink = new AjaxLink( "link.popup" ) { @Override public void onClick( AjaxRequestTarget target ) { target.addComponent( popup ); final StringBuilder s = new StringBuilder(); s.append( "$.fn.popup({" ) .append( "url: \"" ).append( onCloseBehavior.getCallbackUrl() ).append( "\"" ) .append( "});" ); target.appendJavascript( s.toString() ); } }; Works just fine the first time, but each subsequent call, I can see the following message in the Ajax Debug Window: INFO: Channel busy - postponing... Other than the link above, nothing else is going on! Do I need to somehow close the channel, or something? Thanks! =David - 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 - 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 - 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
RE: Ajax channel busy
>Ok, this is fun. It was due to an error in my script. > >I've been doing Java for so many years that I forgot how to use a dynamic >language. I guess I'm too used to having the compiler tell me how much of >an idiot I am so I have less pain at runtime. ;-) Humans aren't perfect - that's why humans invented typesafe languages! :) >BTW, for you experts in js, is there any kind of compiler or validator or >something that you use to help locate errors? Or do you just play around >with things at runtime? Or are you just smarter than me and don't make so >many typos? Not wanting to start a flame war with the dynamic language advocates... Given the complexity of software development I find it amazing that the 'non typesafe language' advocates are so willing to give up one of the best 'error avoidance mechanims' known to the programming world over the last 3 decades. Much better I find a bug at compile time than have it slip through testing and then have customers find it at run time ... But that's my personal opinion and others are free to have theirs' > > >Cheers, >=David > > >On Jul 5, 2010, at 3:19 AM, nino martinez wael wrote: > >> Yeah it does seems as a problem.. what if you try putting in dummy >functions >> with alerts in them? >> >> 2010/7/3 David Leangen >> >>> >>> Ok, thanks, >>> >>> So, if it should be ok, I wonder why after the first execution, I only >get >>> >>> INFO: Channel busy - postponing... >>> >>> So I can't use my component more than once... >>> >>> >>> >>> >>> >>> >>> On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: >>> >>> Should be ok I guess, heres the definition of it, ..: function wicketAjaxGet(url, successHandler, failureHandler, >precondition) 2010/7/3 David Leangen > I should add that in my onCloseHandler, I have this in my js: > > $('#popup #popup-close-link').click(function (e) > { > e.preventDefault(); > $('#popup-mask, #popup-window').hide(); > if( url != "" ) > wicketAjaxGet(url, null, null, null); > }); > > As far as I can tell, this seems to be the correct use of > wicketAjaxGet... > > > Cheers, > =David > > > > > On Jul 3, 2010, at 4:22 PM, David Leangen wrote: > > > Hello, Wicketeers, >> >> I have a link that is supposed to call a JQuery component called >> "popup". >> >> final AjaxLink popupLink = new AjaxLink( "link.popup" ) >> { >> @Override >> public void onClick( AjaxRequestTarget target ) >> { >> target.addComponent( popup ); >> final StringBuilder s = new StringBuilder(); >> s.append( "$.fn.popup({" ) >> .append( "url: \"" ).append( >onCloseBehavior.getCallbackUrl() >> ).append( "\"" ) >> .append( "});" ); >> target.appendJavascript( s.toString() ); >> } >> }; >> >> Works just fine the first time, but each subsequent call, I can see >the >> following message in the Ajax Debug Window: >> >> INFO: Channel busy - postponing... >> >> >> Other than the link above, nothing else is going on! >> >> Do I need to somehow close the channel, or something? >> >> >> Thanks! >> =David >> >> >> - >> 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 > > > >>> >>> - >>> 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax channel busy
Ok, this is fun. It was due to an error in my script. I've been doing Java for so many years that I forgot how to use a dynamic language. I guess I'm too used to having the compiler tell me how much of an idiot I am so I have less pain at runtime. ;-) BTW, for you experts in js, is there any kind of compiler or validator or something that you use to help locate errors? Or do you just play around with things at runtime? Or are you just smarter than me and don't make so many typos? Cheers, =David On Jul 5, 2010, at 3:19 AM, nino martinez wael wrote: > Yeah it does seems as a problem.. what if you try putting in dummy functions > with alerts in them? > > 2010/7/3 David Leangen > >> >> Ok, thanks, >> >> So, if it should be ok, I wonder why after the first execution, I only get >> >> INFO: Channel busy - postponing... >> >> So I can't use my component more than once... >> >> >> >> >> >> >> On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: >> >> Should be ok I guess, heres the definition of it, ..: >>> >>> function wicketAjaxGet(url, successHandler, failureHandler, precondition) >>> >>> >>> >>> >>> 2010/7/3 David Leangen >>> >>> I should add that in my onCloseHandler, I have this in my js: $('#popup #popup-close-link').click(function (e) { e.preventDefault(); $('#popup-mask, #popup-window').hide(); if( url != "" ) wicketAjaxGet(url, null, null, null); }); As far as I can tell, this seems to be the correct use of wicketAjaxGet... Cheers, =David On Jul 3, 2010, at 4:22 PM, David Leangen wrote: Hello, Wicketeers, > > I have a link that is supposed to call a JQuery component called > "popup". > > final AjaxLink popupLink = new AjaxLink( "link.popup" ) > { > @Override > public void onClick( AjaxRequestTarget target ) > { > target.addComponent( popup ); > final StringBuilder s = new StringBuilder(); > s.append( "$.fn.popup({" ) > .append( "url: \"" ).append( onCloseBehavior.getCallbackUrl() > ).append( "\"" ) > .append( "});" ); > target.appendJavascript( s.toString() ); > } > }; > > Works just fine the first time, but each subsequent call, I can see the > following message in the Ajax Debug Window: > > INFO: Channel busy - postponing... > > > Other than the link above, nothing else is going on! > > Do I need to somehow close the channel, or something? > > > Thanks! > =David > > > - > 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 >> >> - >> 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
Re: Ajax channel busy
Yeah it does seems as a problem.. what if you try putting in dummy functions with alerts in them? 2010/7/3 David Leangen > > Ok, thanks, > > So, if it should be ok, I wonder why after the first execution, I only get > > INFO: Channel busy - postponing... > > So I can't use my component more than once... > > > > > > > On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: > > Should be ok I guess, heres the definition of it, ..: >> >> function wicketAjaxGet(url, successHandler, failureHandler, precondition) >> >> >> >> >> 2010/7/3 David Leangen >> >> >>> I should add that in my onCloseHandler, I have this in my js: >>> >>> $('#popup #popup-close-link').click(function (e) >>> { >>> e.preventDefault(); >>> $('#popup-mask, #popup-window').hide(); >>> if( url != "" ) >>> wicketAjaxGet(url, null, null, null); >>> }); >>> >>> As far as I can tell, this seems to be the correct use of >>> wicketAjaxGet... >>> >>> >>> Cheers, >>> =David >>> >>> >>> >>> >>> On Jul 3, 2010, at 4:22 PM, David Leangen wrote: >>> >>> >>> Hello, Wicketeers, I have a link that is supposed to call a JQuery component called "popup". final AjaxLink popupLink = new AjaxLink( "link.popup" ) { @Override public void onClick( AjaxRequestTarget target ) { target.addComponent( popup ); final StringBuilder s = new StringBuilder(); s.append( "$.fn.popup({" ) .append( "url: \"" ).append( onCloseBehavior.getCallbackUrl() ).append( "\"" ) .append( "});" ); target.appendJavascript( s.toString() ); } }; Works just fine the first time, but each subsequent call, I can see the following message in the Ajax Debug Window: INFO: Channel busy - postponing... Other than the link above, nothing else is going on! Do I need to somehow close the channel, or something? Thanks! =David - 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 >>> >>> >>> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Ajax channel busy
Ok, thanks, So, if it should be ok, I wonder why after the first execution, I only get INFO: Channel busy - postponing... So I can't use my component more than once... On Jul 3, 2010, at 10:36 PM, nino martinez wael wrote: Should be ok I guess, heres the definition of it, ..: function wicketAjaxGet(url, successHandler, failureHandler, precondition) 2010/7/3 David Leangen I should add that in my onCloseHandler, I have this in my js: $('#popup #popup-close-link').click(function (e) { e.preventDefault(); $('#popup-mask, #popup-window').hide(); if( url != "" ) wicketAjaxGet(url, null, null, null); }); As far as I can tell, this seems to be the correct use of wicketAjaxGet... Cheers, =David On Jul 3, 2010, at 4:22 PM, David Leangen wrote: Hello, Wicketeers, I have a link that is supposed to call a JQuery component called "popup". final AjaxLink popupLink = new AjaxLink( "link.popup" ) { @Override public void onClick( AjaxRequestTarget target ) { target.addComponent( popup ); final StringBuilder s = new StringBuilder(); s.append( "$.fn.popup({" ) .append( "url: \"" ).append( onCloseBehavior.getCallbackUrl() ).append( "\"" ) .append( "});" ); target.appendJavascript( s.toString() ); } }; Works just fine the first time, but each subsequent call, I can see the following message in the Ajax Debug Window: INFO: Channel busy - postponing... Other than the link above, nothing else is going on! Do I need to somehow close the channel, or something? Thanks! =David - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Ajax channel busy
Should be ok I guess, heres the definition of it, ..: function wicketAjaxGet(url, successHandler, failureHandler, precondition) 2010/7/3 David Leangen > > I should add that in my onCloseHandler, I have this in my js: > >$('#popup #popup-close-link').click(function (e) >{ >e.preventDefault(); >$('#popup-mask, #popup-window').hide(); >if( url != "" ) >wicketAjaxGet(url, null, null, null); >}); > > As far as I can tell, this seems to be the correct use of wicketAjaxGet... > > > Cheers, > =David > > > > > On Jul 3, 2010, at 4:22 PM, David Leangen wrote: > > >> Hello, Wicketeers, >> >> I have a link that is supposed to call a JQuery component called "popup". >> >> final AjaxLink popupLink = new AjaxLink( "link.popup" ) >> { >> @Override >> public void onClick( AjaxRequestTarget target ) >> { >> target.addComponent( popup ); >> final StringBuilder s = new StringBuilder(); >> s.append( "$.fn.popup({" ) >> .append( "url: \"" ).append( onCloseBehavior.getCallbackUrl() >> ).append( "\"" ) >> .append( "});" ); >> target.appendJavascript( s.toString() ); >> } >> }; >> >> Works just fine the first time, but each subsequent call, I can see the >> following message in the Ajax Debug Window: >> >> INFO: Channel busy - postponing... >> >> >> Other than the link above, nothing else is going on! >> >> Do I need to somehow close the channel, or something? >> >> >> Thanks! >> =David >> >> >> - >> 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 > >
Re: Ajax channel busy
I should add that in my onCloseHandler, I have this in my js: $('#popup #popup-close-link').click(function (e) { e.preventDefault(); $('#popup-mask, #popup-window').hide(); if( url != "" ) wicketAjaxGet(url, null, null, null); }); As far as I can tell, this seems to be the correct use of wicketAjaxGet... Cheers, =David On Jul 3, 2010, at 4:22 PM, David Leangen wrote: Hello, Wicketeers, I have a link that is supposed to call a JQuery component called "popup". final AjaxLink popupLink = new AjaxLink( "link.popup" ) { @Override public void onClick( AjaxRequestTarget target ) { target.addComponent( popup ); final StringBuilder s = new StringBuilder(); s.append( "$.fn.popup({" ) .append( "url: \"" ).append( onCloseBehavior.getCallbackUrl() ).append( "\"" ) .append( "});" ); target.appendJavascript( s.toString() ); } }; Works just fine the first time, but each subsequent call, I can see the following message in the Ajax Debug Window: INFO: Channel busy - postponing... Other than the link above, nothing else is going on! Do I need to somehow close the channel, or something? Thanks! =David - 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