« Return to Thread: Generic Component javascript events in Tapestry

Generic Component javascript events in Tapestry

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

Reply to Author | View in Thread

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.

This would look something like:

@Component(id = "myTextField", parameters = {"value=myValue",
"ajaxeventtrigger=onblur", "ajaxeventcontext=context"})
private TextField myTextField;

@OnEvent(component = "myTextField", value="onblur")
private Object handleTextOnBlur(Long context) {
      .... do something ....
      return WhateverIsRequired
}

I still need to do some more thinking about how to handel multiple
events on one component and how this would work nicely with
potentially different contexts for each event.

I really miss this flexibility of setting off a server side event from
any of the js events. 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?

Cheers,
Joost

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

 « Return to Thread: Generic Component javascript events in Tapestry