hijax:event with parameterized events

1 view
Skip to first unread message

Jrad

unread,
Jul 24, 2010, 9:25:37 AM7/24/10
to jquery-claypool
Hi Chris,
Let me thank you again since we are challenging with different aspects
of our web2.0 app these days and you have done several improvements to
claypool to support us.

To have a "event-based" controller, we are using hijax:event to fire
controller events:

{ event:"|:entity|/|:action|", controller:"#entityController",
action:"handleEvent" }

1) we wish hijax:event support parameterized event names, so we could
have a generic rule. (our specific events are like: "contact/created",
"contact/deleted", "someOtherEntity/selected", ...

2) then we need access to the event name in

handleEvent( event, ... )

function so we can discover the specific event handler to run.

chris thatcher

unread,
Jul 25, 2010, 12:26:34 PM7/25/10
to jquery-...@googlegroups.com
There is a specific issue which makes this approach difficult.  It is impossible bind to unspecified events, eg there is no wildcard event.  This basically means you would have to use an AOP wrapper on jquery's internal event modules, which is fine, but it also required that the scripts use $.bind and $.trigger and not native api calls like addEventListener.

Does that make sense and seem like a reasonable requirement for you?  Let me know add I'll add it to the development targets.

Thatcher


--
You received this message because you are subscribed to the Google Groups "jquery-claypool" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to jquery-claypo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jquery-claypool?hl=en.




--
Christopher Thatcher

Jrad

unread,
Jul 30, 2010, 11:17:05 AM7/30/10
to jquery-claypool
Dear Chris,
we finally decided not to use events for our specific usecase and
refactored to use a much more simpler solution than the generic
loosely coupled one before. So you can ignore this requirement now.

Thank you for the clarification.

On Jul 25, 8:26 pm, chris thatcher <thatcher.christop...@gmail.com>
wrote:
> > jquery-claypo...@googlegroups.com<jquery-claypool%2Bunsubscribe@ googlegroups.com>
> > .

chris thatcher

unread,
Jul 30, 2010, 12:30:11 PM7/30/10
to jquery-...@googlegroups.com
you bet.  Thanks again for your help.

To unsubscribe from this group, send email to jquery-claypo...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/jquery-claypool?hl=en.




--
Christopher Thatcher
Reply all
Reply to author
Forward
0 new messages