wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Grigorov <mgrigo...@apache.org>
Subject Re: May Ajax handlers in Wicket 6 slow down rendering?
Date Fri, 03 May 2013 08:56:24 GMT
On Fri, May 3, 2013 at 10:42 AM, Martijn Dashorst <
martijn.dashorst@gmail.com> wrote:

> Would it be something for 7.x to make this more straightforward? Not sure
> how to accomplish that from the top of my head, but it would be quite nice
> to have this out-of-the-box.
>

We created our component with Wicket 1.5.
There is nothing that requires newer Wicket for it.
But let's think how to make some generic ajax behavior for this pattern.


>
> Martijn
>
> On Fri, May 3, 2013 at 9:51 AM, Martin Grigorov <mgrigorov@apache.org
> >wrote:
>
> > Hi,
> >
> > There are many articles in the web about "javascript event delegation".
> > Here is one of them: http://davidwalsh.name/event-delegate
> >
> > The idea is that you should use AjaxEventBehavior on the table component
> > without using AjaxLink or any other Ajax component/behavior for the
> > components in the cells.
> > The cells and rows can have data-xyz attributes with their specific data.
> > When a cell is clicked AjaxCallListener can collect the related data from
> > the data- attributes and send it to the server. The #onClick() method can
> > process the posted data or just broadcast it with Wicket event to the
> > children components so they can process it themselves.
> >
> > This pattern is not so straithforward as using AjaxLink but it indeed
> makes
> > a difference in the performance, especially in IE family.
> >
> >
> >
> > On Fri, May 3, 2013 at 12:15 AM, Nick Pratt <nbpratt@gmail.com> wrote:
> >
> > > Any demos of this with Wicket form components or simple click
> listeners ?
> > >
> > > I'd much rather a repeater have a single listener for grouped events
> (or
> > > maybe at the column level for tables)
> > >
> > > N
> > > On May 2, 2013 6:10 PM, "Dan Retzlaff" <dretzlaff@gmail.com> wrote:
> > >
> > > > Martin-G elaborated a bit on this last year:
> > > >
> > > >
> > >
> >
> http://mail-archives.apache.org/mod_mbox/wicket-users/201209.mbox/%3CCAMomwMqdF3YtLStb_KBnvn9T1PuMP_-+NpDtmtvyt+ac6ecrOA@mail.gmail.com%3E
> > > >
> > > > I think the gist is that you can avoid attaching listeners to each
> > child
> > > > with a single listener on the parent with enough smarts to figure out
> > > which
> > > > child generated the event.
> > > >
> > > >
> > > > On Thu, May 2, 2013 at 3:25 PM, Martin Dietze <di@fh-wedel.de>
> wrote:
> > > >
> > > > > Than you for your help!
> > > > >
> > > > > On Thu, May 02, 2013, Martin Grigorov wrote:
> > > > >
> > > > > > > long blocks of Javascript code executed at "domready".
> > > > > > >
> > > > > >
> > > > > > This depends on how many Ajax components/behaviors you have
in
> your
> > > > page
> > > > > > and how many OnDomReadyHeaderItems are contributed.
> > > > > >
> > > > > > If you use JavaScript event delegation with Wicket Ajax Behavior
> > that
> > > > > > broadcasts events then you can decrease this dramatically.
> > > > >
> > > > > That sounds interesting, but - forgive me my ignorance - this is
> > > > > the first time I hear about this kind of thing. Can you hint me
> > > > > at some example?
> > > > >
> > > > > Cheers,
> > > > >
> > > > > M'bert
> > > > >
> > > > > --
> > > > > ----------- / http://herbert.the-little-red-haired-girl.org /
> > > > > -------------
> > > > > =+=
> > > > > Katz' Law: Man and nations will act rationally when all other
> > > > >            possibilities have been exhausted.
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Martin Grigorov
> > Wicket Training & Consulting
> > http://jWeekend.com <http://jweekend.com/>
> >
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>



-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message