« Return to Thread: Generic Component javascript events in Tapestry

Re: Generic Component javascript events in Tapestry

by Joost Schouten (ml) :: Rate this Message:

Reply to Author | View in Thread

Thanks for the reply, I'll post to this list once I'm done with the result.

Cheers,
Joost

On Sat, Jun 20, 2009 at 1:25 PM, Thiago H. de Paula
Figueiredo<thiagohp@...> wrote:

> Em Fri, 19 Jun 2009 20:31:07 -0300, Joost Schouten (mailing lists)
> <joost_ml@...> escreveu:
>
>> Hi,
>
> Hi!
>
>> I would like to propose an addition to almost every component, so
>> maybe it would be a low-level feature or a mixin, of a
>> t:ajaxeventtrigger parameter which takes a js event which should be
>> triggered.
>
> I prefer the mixin route, as it is more reusable and could even be added to
> HTML elements (using the Any component).
>
>> I still need to do some more thinking about how to handel multiple
>> events on one component
>
> I don't see more than a single couple event for the same component at least
> 90% of the time. Do you? So, if you want to handle more than one event in
> the same component, create one event handler method and create others that
> call the first one.
>
>> and how this would work nicely with
>> potentially different contexts for each event.
>
> Don't forget about EventContext. It's a catch-all.
>
>> I really miss this flexibility of setting off a server side event from
>> any of the js events.
>
> Me too, especially coupled with updating a component. That's the only thing
> I miss from Tapestry 4.
>
>> I will build this myself as a Mixin. But if this
>> already exist, please let me know where, if not, is there a wider need
>> for this and should we consider making this part of Tapestry?
>
> I think Tapestry 5 should have this mixin as part of the core library.
> ChenilleKit already has something like that, the OnEvent mixin
> (http://www.chenillekit.org/chenillekit-tapestry/ref/org/chenillekit/tapestry/core/mixins/OnEvent.html,
> http://www.chenillekit.org/demo/tapcomp/oneventdemo), but I would like
> something that could update zones, not only a JSON response (maybe this
> could be a second mixin).
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@...
> For additional commands, e-mail: dev-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...

 « Return to Thread: Generic Component javascript events in Tapestry