I think the "auto-merging" of configure time and runtime args into
ParamArgs would rock.

IE, if we find we are constantly using the same filter definition (ie,
same params), then we should be able to redefine the filter with a
different name in the event-filters section of the XML, together with
it's params then use that filter in events, overriding params as
needed.

To achieve this at the moment we need to modify the filter's CFC's to
merge the Runtime params into the configTime params.


Dave




On Aug 23, 9:39 pm, Priya K <[email protected]> wrote:
> You are absolutely right but you will get both configure type and time
> type parameters in paramargs.
> Type using isdedined and see if the parameter is really defined.. Just
> a double check.
> On Monday, August 23, 2010, Peter J. Farrell <[email protected]> wrote:
>
>
>
>
>
> > Just to be sure Dave, you're asking about configure time parameters?
> > Not runtime paramArgs (like Priya mentions).   Here's the difference:
>
> >http://trac.mach-ii.com/machii/wiki/IntroToFilters#UsingParameterswit...
>
> > * Configure-time parameters are global and are set when you declare and
> > register the filter with the framework.
> > * Runtime-parameters are passed in via the paramArgs argument in the
> > filterEvent() method and are local to that invocation of that method
> > for that call only. You'd define these parameters inside the <filter
> > name="etc"> part inside your *event-handler* when you want to use
> > the filter.
>
> > HTH,
> > .Peter
>
> > Priya K said the following on 08/23/2010 06:13 AM:
> > It should either not be reloaded or you are not dumping in
> > the right filter. B'se you are using paramArgs you can get every
> > parameters from this argument. <cfdump var =
> > '#arguments.paramArgs()#'>
> >   Is your type in the event-filter correct ?
>
> >   On Sun, Aug 22, 2010 at 10:40 PM, Dave <[email protected]>
> > wrote:
> >   Hi
> > Peter,
>
> > I'm dumping in the FilterEvent method.
>
> >        <cffunction name="filterEvent" access="public"
> > returntype="boolean"
> > output="false">
> >                <cfargument name="Event" type="MachII.framework.Event"
> > required="true" />
> >                <cfargument name="EventContext"
> > type="MachII.framework.EventContext"
> > required="true" />
> >                <cfargument name="paramArgs" type="struct"
> > required="false"
> > default="#StructNew()#" />
>
> >                <cfdump var="#getParameters()#">
> >                <cfdump var="#variables#">
> >                <cfabort>
> > I can see variables.parameters in the above dump, however the struct
> > is empty.
>
> > My Filter extends="machii.framework.EventFilter" and there is no
> > configure/init method defined at this local level.
>
> > Regards,
> > Dave
>
> > On Aug 23, 12:00 pm, "Peter J. Farrell" <[email protected]>
> > wrote:
> >> A few questions for you.
>
> >> * Where are you dumping the parameters?
> >> * What does you filter code look like?  Please share.
> >> * Do you have an init() method in your filter CFC?  If you do, you
> >> probably should be using the configure() method instead.  The
> > init()
> >> method is not meant to be overridden and all "setup" code should
> > be done
> >> in the configure() method.  We do pass in the parameters to the
> > init()
> >> method which is automatically called by the framework (it's an
> > inherited
> >> method).  So if they are missing, I bet you're overriding the
> > init()
> >> method and therefore there are not being set for you.
>
> >> Here's the FAQ about this:
>
> >>http://trac.mach-ii.com/machii/wiki/FAQDifferenceBetweenUsingInitAndC...
>
> >> .pjf
>
> >> Dave said the following on 08/22/2010 07:23 PM:
>
> >> > Hi All,
>
> >> > I can't see to access getParameters from without a filter.
> >  eg:
>
> >> >    <event-filter name="JobTaskPermissionToAccess"
> >> > type="sys.jo.core.m2filter.Task">
> >> >            <parameters>
> >> >                    <parameter name="PersistTaskItem"
> > value="true"/>
> >> >                    <parameter name="action"
> > value="getStaticAccessPermissions"/>
> >> >                    <parameter name="AccessTaskTypes"
> > value="Configure User Job
> >> > Permission,Configure Assessment Processes,Initialise
> > JCW,Create Job
> >> > >From Template,View Configuration Log,Manual Override of
> > Auto Reference
> >> > Number,Manage Job Files for Applicants,Manage Job Files for
> >> > Recruiters,Configure Application Form,Configure Online
> > Candidate
> >> > Scheduling,Access PreVisor Assessment"/>
> >> >                    <parameter name="haltOnNoPermission"
> > value="false"/>
> >> >                    <parameter name="itemResultArg"
> > value="permissionToAccess" />
> >> >            </parameters>
> >> >    </event-filter>
> >> > </event-filters>
>
> >> > <filter name="JobTaskPermissionToAccess" />
>
> >> > When I do a dump of getParameters in the filter, it dumps an
> > empty
> >> > struct.
>
> >> > Any ideas?
>
> >> > Thanks,
> >> > dave
>
> > --
> > You received this message because you are subscribed to Mach-II for
> > CFML list.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > --
> > You received this message because you are subscribed to Mach-II for
> > CFML list.
> > 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 
> > athttp://groups.google.com/group/mach-ii-for-coldfusion?hl=en
>
> > ***New URLs as of April 29th, 2010***
> > SVN:http://svn.mach-ii.com/machii/
> > Wiki / Documentation / Tickets:http://trac.mach-ii.com/machii/
>
> > --
> > You received this message because you are subscribed to Mach-II for CFML 
> > list.
> > 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 
> > athttp://groups.google.com/group/mach-ii-for-coldfusion?hl=en
>
> > ***New URLs as of April 29th, 2010***
> > SVN:http://svn.mach-ii.com/machii/
> > Wiki / Documentation / Tickets:http://trac.mach-ii.com/machii/

-- 
You received this message because you are subscribed to Mach-II for CFML list.
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/mach-ii-for-coldfusion?hl=en

***New URLs as of April 29th, 2010***
SVN: http://svn.mach-ii.com/machii/
Wiki / Documentation / Tickets: http://trac.mach-ii.com/machii/

Reply via email to