On May 21, 2:53 am, Chris Blackwell <[email protected]> wrote:
> @Jamie: What I was suggesting with multiple event-handlers would change the
> way you work.  Let me try and clarify how i see it working.
> The event-handlers block gets an optional attribute defaultEventType which
> accepts a list of event-types to be applied to any handler within the block.
>  The defaultEventType can be overridden for any event-handler by using the
> type attribute.  Both are entirely optional

@Chris: Yes, I'm with you on this. When you first introduced the idea
of multiple event-handlers in a file, the idea of the single event-
handler override with the type attribute wasn't mentioned, so I was
uneasy with that. The more I think about it now, the more I like this
idea -- exactly as you've just summarized.

The only situation I could see being slightly confusing is when you
have multiple default event types for an event-handlers block and, for
a single event-handler, you'd like to remove one of the default types
and add a new type. In this situation you'd have to list both your new
type and "repeat" any of the default types that you'd like to keep in
your event-handler type attribute. It feels a little funny to list a
default type in an explicit event-handler type attribute, but since
you need that to be an override, it's the only option I can think of.
I just mention it as the only situation I can see not being crystal
clear, but I'm okay with it -- still has my vote.

Here's an example, in which I want to override/remove the "secured"
default type, but keep the "templated" default type and add a "foo"
type:

<event-handlers defaultType="secured,templated>
        <event-handler name="login.form" type="templated,foo">
        </event-handler>
</event-handlers>

Best,
Jamie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to