Alrighty. Thanks :) ~~ Summer AKA Collectonian
On Mon, Jan 11, 2010 at 3:53 PM, Peter J. Farrell <[email protected]> wrote: > Summer, > > I'm going to update the wiki entry (parts of it were contributed) as the > wiki entry example shouldn't show replacing itself with a non-Mach-II > extended CFC. If you use my suggestions on renaming the property name for > the CFC that is loading the session facade to "sessionFacadeLoader" -- > you'll be fine. At the moment, the behavior in your application as it > stands is doing something that the framework doesn't support -- it's just in > 1.6 it didn't show it's ugly head as it didn't check for this. 1.8 is just > more strict on this rule that 1.6 was. > > Best, > .Peter > > Summer Wilson said the following on 11/01/10 13:11: > > Okay...I'm really confused, because I basically went by > http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/UsingSessionFacadepretty > much to the letter, except for having different session variables? > And all of worked perfectly in 1.6... > > ~~ Summer AKA Collectonian > > > On Mon, Jan 11, 2010 at 12:48 PM, Peter J. Farrell <[email protected]>wrote: > >> Ah, I see what is going on... What's happening is kind of not recommended >> architecture. >> >> This property: >> >> >> <property name="sessionFacade" type="properties.SessionProperty" /> >> >> Extends the MachII.framework.Property construct. Because this is a >> framework extension, we set this property name of "sessionFacade" as a >> "configurable property", however this property then creates a session facade >> and sets it into the Mach-II as a property named "sessionFacade". So what >> is happening is that you are replacing the "sessionFacade" property with a >> non-configurable property later on at runtime. Essentially, you're swapping >> in a non-Mach-II extended component into a slot that the framework marked as >> "Mach-II configurable". >> >> I'd recommend not using a Mach-II property CFC to load a non-Mach-II CFC >> in the same Mach-II property name. You could easily fix the issue by >> changing: >> >> >> <property name="sessionFacade" type="properties.SessionProperty" /> >> >> To this: >> >> <property name="sessionFacadeLoader" type="properties.SessionProperty" /> >> >> Your "loader" will still function the same and place a reference to your >> "real" session facade into the "sessionFacade" property. >> >> HTH, >> .Peter >> >> P.s. Your cfparams will only be run once when the session facade loads >> because your session facade is a singleton. If you want to set those >> session variables when a new session starts, I'd recommend looking at the >> onSessionStart() plugin point in Mach-II. You don't have to set the >> variables in that plugin point, but at least have the plugin point call an >> "onSessionStart()" method in your session facade. In your plugin you can do >> this: >> >> <cffunction name="onSessionStart"> >> <cfset getProperty("sessionFacade").onSessionStart() /> >> </cffunction> >> >> In you session facade, add this: >> >> <cffunction name="onSessionStart"> >> <cfset session.mycaptcha = "" /> >> <cfset session.UpdateProfile = false /> >> <cfset session.UpdatePassword = false /> >> </cffunction> >> >> This is just pseudo code, but I think you can get the picture. I think >> you're random error you might be seeing might has to do with missing session >> variables. Just a guess since I haven't seen the exception. >> >> > > > -- > 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 > SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ > Wiki / Documentation / Tickets: > http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/ >
-- 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 SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/ Wiki / Documentation / Tickets: http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
