Indeed, you can also workaround the page context bug by not referencing session/application scope or by passing the necessary values at the creation of the CFC instance.
In my case, I prefer to build my CFCs as if there was no page-context bug... I've got plenty of application variables that I might need in a session CFCs, I prefer not to have specific properties to store those values in my Session CFCs (especially if those properties have nothing to do with the CFC functionalities). It is a temporarly workaround that I'll remove once the bug will be fixed (I'll juste have to remove all the <cf_reinit>). Benoit Hediard www.benorama.com > -----Message d'origine----- > De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] la > part de Nathan Dintenfass > Envoye : mardi 25 mars 2003 20:49 > A : [EMAIL PROTECTED] > Objet : RE: Page context bug workaround (was RE: [CFCDev] MVCF at > benorama.com) > > > Benoit: > > Can you explain a bit more about why you need to do that? > > In my experience, if you store an instance in the session struct, > but don't > actually refer to session/application vars inside of the component you > should not run into the page context bug. For the components I have used > cached in a session, I just private instance variables to hold any > persistent data -- that way I preserve encapsulation and never > have to work > around the page context bug. > > I'd be curious to know what others are running into, though. > > - Nathan > > > > -----Original Message----- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Behalf Of Benoit Hediard > > Sent: Tuesday, March 25, 2003 11:46 AM > > To: [EMAIL PROTECTED] > > Subject: Page context bug workaround (was RE: [CFCDev] MVCF at > > benorama.com) > > > > > > The session.currentMember is an instance of > > com.mycompany.member.MemberSession CFC. > > > > In order to wait for a fix of the Page Context bug (...), I'm using a > > workaround custom tag called <cf_reinit> that allow me to get > > back the page > > context in Session CFCs. > > > > I don't remember where I got this <cf_reinit> custom tag... > > I can send it to you off list if you wish. > > > > Benoit Hediard > > www.benorama.com > > > > > > - Session CFCs that act as a facade to handle the client session > > > > (statefull). > > > > Ex. : > > > > <!--- use the com.mycompany.member.MemberSession CFC put in session > > > > scope ---> > > > > <cfif session.currentMember.hasTheRightToDoThat()> > > > > ... > > > > </cfif> > > > > > > Is the CFC in the session or is a data structure produced by (and > > > subsequently manipulated by) in the session? If the former, won't you > > > hit the Page Context Bug? > > > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
