You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Pedro Santos <pe...@gmail.com> on 2010/12/09 20:51:04 UTC

Wicket JavaScript structure

The Wicket.Event.handle function at wicket-event.js calls the Wicket.$ one
defined at wicket-ajax.js. But it is not safe call Wicket.$ because the page
can be not using AJAX. Is interest separate utility methods at an
wicket-util.js file?

-- 
Pedro Henrique Oliveira dos Santos

Re: Wicket JavaScript structure

Posted by Pedro Santos <pe...@gmail.com>.
UploadProgressBar is using its own AJAX transportation and don't need to
contribute with the wicket-ajax.js to header. I will try to change it to use
the wicket-ajax.js API instead, than I the wicket-event.js code will be
fine.


On Fri, Dec 10, 2010 at 8:02 AM, Igor Vaynberg <ig...@gmail.com>wrote:

> event should not need ajax, probably an oversight. we should fix it.
>
> -igor
>
> On Thu, Dec 9, 2010 at 10:33 PM, Martin Grigorov <mg...@apache.org>
> wrote:
> > There are plans to rework those in Wicket 1.6.
> > The idea is to replace the custom code with one using some of the popular
> JS
> > libraries, most probably JQuery.
> >
> > Introducing wicket-util.js will mean to add another resource reference
> (like
> > WicketAjaxReference and WicketEventReference) and add dependencies
> between
> > them,
> > so loading any of -ajax.js or -event.js should load also -util.js.
> > I don't remember any complains about that in the mailing lists, but if
> you
> > want you can play with it.
> >
> > On Thu, Dec 9, 2010 at 8:51 PM, Pedro Santos <pe...@gmail.com>
> wrote:
> >
> >> The Wicket.Event.handle function at wicket-event.js calls the Wicket.$
> one
> >> defined at wicket-ajax.js. But it is not safe call Wicket.$ because the
> >> page
> >> can be not using AJAX. Is interest separate utility methods at an
> >> wicket-util.js file?
> >>
> >> --
> >> Pedro Henrique Oliveira dos Santos
> >>
> >
>



-- 
Pedro Henrique Oliveira dos Santos

Re: Wicket JavaScript structure

Posted by Igor Vaynberg <ig...@gmail.com>.
event should not need ajax, probably an oversight. we should fix it.

-igor

On Thu, Dec 9, 2010 at 10:33 PM, Martin Grigorov <mg...@apache.org> wrote:
> There are plans to rework those in Wicket 1.6.
> The idea is to replace the custom code with one using some of the popular JS
> libraries, most probably JQuery.
>
> Introducing wicket-util.js will mean to add another resource reference (like
> WicketAjaxReference and WicketEventReference) and add dependencies between
> them,
> so loading any of -ajax.js or -event.js should load also -util.js.
> I don't remember any complains about that in the mailing lists, but if you
> want you can play with it.
>
> On Thu, Dec 9, 2010 at 8:51 PM, Pedro Santos <pe...@gmail.com> wrote:
>
>> The Wicket.Event.handle function at wicket-event.js calls the Wicket.$ one
>> defined at wicket-ajax.js. But it is not safe call Wicket.$ because the
>> page
>> can be not using AJAX. Is interest separate utility methods at an
>> wicket-util.js file?
>>
>> --
>> Pedro Henrique Oliveira dos Santos
>>
>

Re: Wicket JavaScript structure

Posted by Martin Grigorov <mg...@apache.org>.
There are plans to rework those in Wicket 1.6.
The idea is to replace the custom code with one using some of the popular JS
libraries, most probably JQuery.

Introducing wicket-util.js will mean to add another resource reference (like
WicketAjaxReference and WicketEventReference) and add dependencies between
them,
so loading any of -ajax.js or -event.js should load also -util.js.
I don't remember any complains about that in the mailing lists, but if you
want you can play with it.

On Thu, Dec 9, 2010 at 8:51 PM, Pedro Santos <pe...@gmail.com> wrote:

> The Wicket.Event.handle function at wicket-event.js calls the Wicket.$ one
> defined at wicket-ajax.js. But it is not safe call Wicket.$ because the
> page
> can be not using AJAX. Is interest separate utility methods at an
> wicket-util.js file?
>
> --
> Pedro Henrique Oliveira dos Santos
>