Whenever I hear mention of onRequest(), onRequestStart(), onRequestEnd() and
Flex remoting in the same sentence, its time to question life and everything
else.  They don't mix well.  Check out saythis blog post for one
http://www.sargeway.com/blog/index.cfm/2006/11/29/OnRequest-and-OnRequestStart-Discussion

HTH

peas



Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?


On Sat, Feb 21, 2009 at 2:12 PM, Jordan Farr <[email protected]>wrote:

>
> Nimer, Paul, and David,
>
>
>
> Thank you for your replies.
>
>
>
> My Application.cfc (CF8) is indeed in a folder just above my CFCs folder. I
> know the Application.cfc functions are being called because my CFM page
> (let's call it dsp_CFCTestBody.cfm) displays with the header and footer that
> are included in onRequestStart() and onRequestEnd() which are both part of
> Application.cfc. In other words, Application.cfc is in the right place and
> is being called correctly (unless I'm missing something here).
>
>
>
> The problematic part is this: My dsp_CFCTestBody.cfm invokes the exact same
> function (myFunction) in the exact same CFC (myCFC) but in two different
> ways; in CFML using CFINVOKE and from a Flash movie built in Flex 3 using
> Flash remoting. All myFunction does is return a value in SESSION scope, so
> basically <CFRETURN SESSION.someVar>. When myFunction is called in CFML, it
> returns someVar correctly, but when it is called via Flash remoting, it
> barks SESSION is undefined. I know the function is being called correctly
> from the Flash movie because if I change <CFRETURN SESSION.someVar> to
> <CFRETURN "Hello World!"> in myFunction, I'll get "Hello World!" in the
> Flash movie.
>
>
>
> I hope this clarifies the issue.
>
>
>
> Is there an XML setting somewhere I need to worry about? Is there something
> I have to change in CF8 Administrator (besides the obvious Enable Flash
> Remoting)?
>
>
>
> Thank you all.
>
>
>
> JF
>
>
> > Date: Sat, 21 Feb 2009 10:02:41 -0800
> > Subject: Re: CFCs called from Flex are no t seeing AP PLICAT ION,
> SESSION, or other shared-scope v a riable sâ€
> > From: [email protected]
> > To: [email protected]
> >
> >
> > you just need to make sure your application.cfm/cfc is in a folder above
> the cfc's. CF uses the same rules to find the application.cfm/cfc when
> invoking a cfc directly from flex as it does when its looking for the
> application.cfm/cfc when you invoke a cfm page. It walks up the folder tree
> to find it.
> >
> > Most likely you have an application.cfm in the folder with your test cfm
> pages, but that is not in a folder above the cfcs so when you invoke the cfc
> directly ColdFusion can't find the same application.cfm.
> >
> > hth,
> > ---nimer
> >
> >
> >
> >
> > ________________________________
> > From: Paul Kukiel <[email protected]>
> > To: flex <[email protected]>
> > Sent: Friday, February 20, 2009 6:29:12 PM
> > Subject: RE: CFCs called from Flex are no t seeing APPLICAT ION, SESSION,
> or other shared-scope va riable sâ€
> >
> >
> > David,
> >
> > That's actually not correct. Flex remoting works in the same way as a
> normal cfm. You have full access to application and session scoping even if
> you just directly access a cfc.
> >
> > Paul
> >
> > -----Original Message-----
> > From: David Henry [mailto:[email protected]]
> > Sent: Friday, February 20, 2009 5:13 PM
> > To: flex
> > Subject: Re: CFCs called from Flex are not seeing APPLICAT ION, SESSION,
> or other shared-scope va riablesâ€
> >
> >
> > Jordan,
> > Someone correct me if I'm wrong. I think calling a cfc directly will
> > bypass the Application.cfm or Application.cfc file. This means there is
> > no context for the application or session scope because the
> > cfapplication tag was probably skipped.
> >
> > Hope that helps,
> > David
> >
> >
> > Jordan Farr wrote:
> > > Hello all,
> > >
> > > When I call my CFCs (CF8) using CFML from a CFM page, I can access
> APPLICATION and SESSION variables no problem (i.e. the CFC is aware that it
> is part of a given application that has some session variables). However, a
> Flash movie built with Flex 3, sitting on the same CFM page as my working
> CFML code, calling the same CFC as my CFML code, does not work because it
> says that variables APPLICATION, SESSION, etc are undefined.
> > >
> > > I am not sure how to fix this issue.
> > >
> > > I know the CFC is accessible from the Flash movie because if I change
> the CFC code to return a string "Hello World!" and ask the Flash movie to
> Alert.show() it, it shows "Hello World!", so the lines of communications are
> open. It is as if when a CFC is called via Flash remoting from Flex (I'm
> using Remote Objects in Flex), the CFC doesn't know it is part of an
> Application instance and instead acts statically.
> > >
> > >
> >
> >
> >
> >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5787
Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to