Arguments are child tags of Message tags.
For example:
<event-handler name="page.index" type="SecuredEvent">
<broadcasts>
<message name="NeedStuff">
<argument name="requiredRole" value="admin" /> <!-- This is the
role I want to pass to my secured event -->
</message>
</broadcasts>
<results>
<result do="view.templateSideNav" />
</results>
<views>
<include name="body" template="dspIndexSideNav.cfm" />
</views>
</event-handler>
Thus, there isn't currently a mechanism to pass an argument to an
event-handler as far as I know.
DW
On Wed, Jul 15, 2009 at 5:54 PM, Jeremy Prevost <[email protected]> wrote:
>
> Hi!
>
> I'm trying to use an EventType to secure my events. I'm not having any
> trouble getting my "SecuredEvent" to trigger before the rest of my
> broadcast. However, what I am having trouble with is passing an
> argument into the SecuredEvent. In short, I want to pass in a required
> role, but define it in my event config.
>
> Here's the type of thing I'm trying to do, but it doesn't work.
>
> <event-handler name="page.index" type="SecuredEvent">
> <argument name="requiredRole" value="admin" /> <!-- This is the
> role I want to pass to my secured event -->
> <broadcasts>
> <message name="NeedStuff" />
> </broadcasts>
> <results>
> <result do="view.templateSideNav" />
> </results>
> <views>
> <include name="body" template="dspIndexSideNav.cfm" />
> </views>
> </event-handler>
>
> Is this not supported, or am I just having a syntax problem?
>
> Thanks,
> Jeremy
> >
>
--
“Come to the edge, he said. They said: We are afraid. Come to the edge, he
said. They came. He pushed them and they flew.”
Guillaume Apollinaire quotes
--~--~---------~--~----~------------~-------~--~----~
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 .
-~----------~----~----~----~------~----~------~--~---