You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martin Makundi <ma...@koodaripalvelut.com> on 2009/11/08 17:39:46 UTC
Re: Wicket and JQuery
Hi.. I came across jquery live or livequery. That might work better
with wicket, I'll look more into that. Basically the idea is that the
event handlers are standalone and if you replace a dom element with
another, the events will still work if the new element matches the
event specification (id, tag name, class etc.).
**
Martin
2009/10/28 Jeremy Thomerson <je...@wickettraining.com>:
> I use custom event binding quite a bit within jQuery... for instance:
>
> $(document).bind('fooUpdated', function() {
> // here I make a textfield within foo into an autocomplete textfield
> });
>
> Then, when I call to AJAX that replaces "foo", I just do:
>
> $(document).trigger('fooUpdated');
>
> This works great. Just do all your UI component creation within custom
> event handlers. Then, to handle the creation of them on load, use:
>
> $(document).ready(function() {
> $(document).trigger('fooUpdated');
> });
>
>
> The problem comes when using plugins that [foolishly] use $(document).ready
> to do any styling, etc. If you encounter them, you may be able to try
> $(document).trigger('ready'); I have never tried this - there may be
> unintended consequences.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
> On Tue, Oct 27, 2009 at 11:38 PM, Martin Makundi <
> martin.makundi@koodaripalvelut.com> wrote:
>
>> ... and expect trouble with ajaxifying jquery plugins that skin html
>> components. They will not work properly if you replace your components
>> via ajax - or at least you might have to work hard on it.
>>
>> **
>> Marin
>>
>> 2009/10/27 Jeremy Thomerson <je...@wickettraining.com>:
>> > I'd suggest only using jQuery for the UI effects and let Wicket do the
>> AJAX.
>> >
>> > --
>> > Jeremy Thomerson
>> > http://www.wickettraining.com
>> >
>> >
>> >
>> > On Tue, Oct 27, 2009 at 4:06 PM, Jeffrey Schneller <
>> > jeffrey.schneller@envisa.com> wrote:
>> >
>> >> I am trying to determine how to use Wicket and JQuery. I would prefer
>> >> not using wiQuery or similar. I would like to just include the jQuery
>> >> libraries in my html and then use jQuery as javascript and not wrap
>> >> everything in java on the server side to generate the client code.
>> >>
>> >>
>> >>
>> >> How would one go about doing this? I assume the basic jQuery
>> >> functionality is straight forward. However how would you implement
>> >> jQuery code that uses Ajax to communicate back to the server using
>> >> Wicket on the server? Or would the recommendation be to let Wicket
>> >> handle the Ajax communication and only use jQuery for the UI components
>> >> such as "Lightbox", "Greybox", apple like sliders, etc.
>> >>
>> >>
>> >>
>> >> Any ideas?
>> >>
>> >>
>> >>
>> >> Thanks.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org