Robert,

I'm guessing it's probably because you don't have an init-method as a  
constructor in your controller.  You can do one of two things:

1)  extend ModelGlue.unity.controller.Controller in the component  
attributes ( i.e extends="ModelGlue.unity.controller.Controller")

2) Add an init method.  Here's an example:

<cffunction name="Init" access="public" returnType="any"  
output="true" hint="I return a new Controller.">
   <cfargument name="ModelGlue"  
type="ModelGlue.unity.framework.ModelGlue" required="true" hint="I am  
an instance of ModelGlue.">
   <cfargument name="name" type="string" required="false" hint="A  
name for this controller." default="#createUUID()#">
   <cfset variables.ModelGlue = structNew() />
   <cfset variables.ModelGlue.framework = arguments.ModelGlue />
   <cfset variables.name = arguments.name />
<cftry>
   <cfset variables.ModelGlue.ModelGlueCache = createObject 
("component", "ModelGlue.Util.TimedCache").init(createTimespan 
(0,0,GetModelGlue().GetConfigSetting("defaultCacheTimeout"),0)) />
        <cfcatch>
          <cfset variables.ModelGlue.ModelGlueCache = createObject 
("component", "ModelGlue.Util.TimedCache").init(createTimespan 
(0,0,0,0)) />
        </cfcatch>
</cftry>
   <cfreturn this />
</cffunction>

HTH,
Jon


On Apr 5, 2007, at 9:57 AM, Robert Rawlins - Think Blue wrote:

> Hey guys,
>
>
>
> I'm having trouble trying to implement a security controller into  
> my MG
> application. It hasn't even got any functions in it yet, but it keeps
> crashing my app, no errors, just a blank screen in front of me.
>
>
>
> Here is my model-glue.xml definition for the controller.
>
>
>
>             <controller name="SecurityController"
> type="Controller.Security">
>
>             </controller>
>
>
>
> And the code from within the Security.cfc
>
>
>
> <cfcomponent name="Security" displayname="Security Controller" hint="I
> handle security integration." output="false">
>
>
>
>       <cffunction name="onRequestStart" access="public"  
> returnType="void"
> output="false">
>
>             <cfargument name="Event" required="true" type="any"  
> hint="The
> event that initiate the contorller method" />
>
>       </cffunction>
>
>
>
>       <cffunction name="onQueueComplete" access="public"  
> returnType="void"
> output="false">
>
>             <cfargument name="Event" required="true" type="any"  
> hint="The
> event that initiate the contorller method" />
>
>       </cffunction>
>
>
>
>       <cffunction name="onRequestEnd" access="public"  
> returnType="void"
> output="false">
>
>             <cfargument name="Event" required="true" type="any"  
> hint="The
> event that initiate the contorller method" />
>
>       </cffunction>
>
>
>
> </cfcomponent>
>
>
>
> Any ideas why this is causing me problems? As soon as I remove the
> controller reference from the XML, it works just fine.
>
>
>
> Thanks,
>
>
>
> Rob
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274631
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to