Bingo.  That did it.  Thanks.   I'm sure I'll have more questions.

Byron

On Nov 16, 8:00 pm, Ezra Parker <[email protected]> wrote:
> Yeah, I've run into this issue before. The problem here is that your
> Model-Glue application has not yet been initialized, and the
> RemotingService won't spin it up. The solution is to hit the
> application in a browser -- after you do this, the remoting call
> should work as expected.
>
> Please be sure to report back if you encounter any further roadblocks.
>
> --
> Ezra Parker
>
> On Mon, Nov 16, 2009 at 4:24 PM, byron <[email protected]> wrote:
> > Thanks Ezra and John.  Missed that.  After fixing that, the grid now
> > shows, but no data.  Now I have a new error message:
>
> > RPC Fault faultString="Unable to invoke CFC - Can't locate Model-Glue
> > instance named _modelglue in application scope!" faultCode=""
> > faultDetail=""]
> >        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/
> > internal::faultHandler()[E:\dev\gumbo_beta2\frameworks\projects\rpc\src
> > \mx\rpc\AbstractInvoker.as:345]
> >        at mx.rpc::Responder/fault()[E:\dev\gumbo_beta2\frameworks\projects
> > \rpc\src\mx\rpc\Responder.as:68]
> >        at 
> > mx.rpc::AsyncRequest/fault()[E:\dev\gumbo_beta2\frameworks\projects
> > \rpc\src\mx\rpc\AsyncRequest.as:113]
> >        at NetConnectionMessageResponder/statusHandler()[E:\dev
> > \gumbo_beta2\frameworks\projects\rpc\src\mx\messaging\channels
> > \NetConnectionChannel.as:604]
> >        at mx.messaging::MessageResponder/status()[E:\dev
> > \gumbo_beta2\frameworks\projects\rpc\src\mx\messaging
> > \MessageResponder.as:264]
>
> > I looked at the AbstractRemotingService.cfc and did not fine any
> > references to application._modelglue.  I do see request._modelglue.
> > One thing I did do was edit the RemotingService.cfc with :
>
> > <cfset template = "/eRequest/index.cfm" /> which is the folder of y
> > model-glue app, but I think that's not really the issue since I'm
> > using CF9.
>
> > Any things I could be missing?
>
> > Byron
>
> > On Nov 16, 4:32 pm, Ezra Parker <[email protected]> wrote:
> >> Hi Byron,
>
> >> I could certainly be mistaken, but I think that the dataProvider
> >> attribute of your DataGrid tag needs to be surrounded with curly
> >> braces, like so:
>
> >> <mx:DataGrid dataProvider="{stuff}" width="90%">
>
> >> HTH,
>
> >> --
> >> Ezra Parker
>
> >> On Mon, Nov 16, 2009 at 11:59 AM, byron <[email protected]> wrote:
>
> >> > Hi all.  I went to the Adobe Intro to Flex training for CF developers
> >> > this past weekend in Durham.  With all this new found goodness, I
> >> > wanted to try it out on one of my MG apps.
>
> >> > I'm running CF9, lastest MG3, Flex 4.  The current MG3 app is
> >> > functioning correctly.
>
> >> >  I followed the instructions for using the MG remoting service cfc and
> >> > getting the following error.
>
> >> > ReferenceError: Error #1065: Variable stuff is not defined.
> >> >        at global/flash.utils::getDefinitionByName()
> >> >        at mx.utils::DescribeTypeCache$/describeType()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\utils
> >> > \DescribeTypeCache.as:106]
> >> >        at 
> >> > mx.utils::ObjectUtil$/getClassInfo()[E:\dev\gumbo_beta2\frameworks
> >> > \projects\framework\src\mx\utils\ObjectUtil.as:944]
> >> >        at 
> >> > mx.controls::DataGrid/generateCols()[E:\dev\gumbo_beta2\frameworks
> >> > \projects\framework\src\mx\controls\DataGrid.as:2696]
> >> >        at mx.controls::DataGrid/collectionChangeHandler()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\controls\DataGrid.as:
> >> > 4560]
> >> >        at mx.controls.listClasses::ListBase/set dataProvider()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\controls\listClasses
> >> > \ListBase.as:2267]
> >> >        at mx.controls::DataGrid/set dataProvider()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\controls\DataGrid.as:
> >> > 1615]
> >> >        at 
> >> > eFlex/_eFlex_DataGrid1_c()[D:\Users\braines\Eclipse\workspace\eFlex
> >> > \src\eFlex.mxml:5]
> >> >        at eFlex/_eFlex_Array1_c()
> >> >        at mx.core::DeferredInstanceFromFunction/getInstance()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\core
> >> > \DeferredInstanceFromFunction.as:105]
> >> >        at 
> >> > spark.components::SkinnableContainer/createDeferredContent()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\spark\src\spark\components
> >> > \SkinnableContainer.as:845]
> >> >        at 
> >> > spark.components::SkinnableContainer/createContentIfNeeded()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\spark\src\spark\components
> >> > \SkinnableContainer.as:877]
> >> >        at spark.components::SkinnableContainer/createChildren()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\spark\src\spark\components
> >> > \SkinnableContainer.as:685]
> >> >        at mx.core::UIComponent/initialize()[E:\dev\gumbo_beta2\frameworks
> >> > \projects\framework\src\mx\core\UIComponent.as:6874]
> >> >        at spark.components::Application/initialize()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\spark\src\spark\components
> >> > \Application.as:783]
> >> >        at eFlex/initialize()
> >> >        at mx.managers.systemClasses::ChildManager/childAdded()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\managers
> >> > \systemClasses\ChildManager.as:176]
> >> >        at mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\managers
> >> > \SystemManager.as:2808]
> >> >        at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/
> >> > internal::kickOff()[E:\dev\gumbo_beta2\frameworks\projects\framework
> >> > \src\mx\managers\SystemManager.as:2623]
> >> >        at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/
> >> > internal::preloader_completeHandler()[E:\dev\gumbo_beta2\frameworks
> >> > \projects\framework\src\mx\managers\SystemManager.as:2532]
> >> >        at flash.events::EventDispatcher/dispatchEventFunction()
> >> >        at flash.events::EventDispatcher/dispatchEvent()
> >> >        at mx.preloaders::Preloader/timerHandler()[E:\dev
> >> > \gumbo_beta2\frameworks\projects\framework\src\mx\preloaders
> >> > \Preloader.as:530]
> >> >        at flash.utils::Timer/_timerDispatch()
> >> >        at flash.utils::Timer/tick()
>
> >> > Here is the relevant code:
>
> >> > my xmxl file:
>
> >> > <?xml version="1.0" encoding="utf-8"?>
> >> > <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
> >> >                           xmlns:s="library://ns.adobe.com/flex/spark"
> >> >                           xmlns:mx="library://ns.adobe.com/flex/halo" 
> >> > minWidth="1024"
> >> > minHeight="768"
> >> >                           creationComplete="init()">
> >> >        <fx:Declarations>
> >> >                <!-- Place non-visual elements (e.g., services, value 
> >> > objects) here
> >> > -->
> >> >                <mx:RemoteObject id="mgrs"
> >> >                                                 destination="ColdFusion"
> >> >                                                 
> >> > source="eRequest.RemotingService"
> >> >                                                 
> >> > result="resultHandler(event)"
> >> >                                                 showBusyCursor="true" />
> >> >        </fx:Declarations>
>
> >> >        <s:layout>
> >> >                <s:VerticalLayout paddingTop="10" paddingBottom="10"
> >> > horizontalAlign="center" />
> >> >        </s:layout>
>
> >> >        <fx:Script>
> >> >                <![CDATA[
> >> >                import mx.collections.ArrayCollection;
> >> >                import mx.rpc.events.*;
>
> >> >                [Bindable]
> >> >                public var stuff:ArrayCollection;
>
> >> >                public function init():void{
>
> >> >                //call Model-Glue Remoting Service cfc
> >> >                
> >> > mgrs.executeEvent("requests.ListRequests",{},"qryRequests");
> >> >                }
>
> >> >                public function resultHandler(event:ResultEvent):void{
> >> >                stuff = event.result.qryRequests as ArrayCollection;
> >> >                }
>
> >> >                ]]>
> >> >        </fx:Script>
> >> >        <mx:DataGrid dataProvider="stuff" width="90%">
> >> >                <mx:columns>
> >> >                        <mx:DataGridColumn headerText="Request Number"
> >> > dataField="RequestNum"/>
> >> >                </mx:columns>
> >> >        </mx:DataGrid>
> >> > </s:Application>
>
> >> > My event handler:
>
> >> >                <event-handler name="requests.ListRequests" 
> >> > type="templatedPage">
> >> >                        <broadcasts>
> >> >                                <message name="requests.ListRequests"/>
> >> >                        </broadcasts>
> >> >                        <results/>
> >> >                        <views>
> >> >                                <name name="body" 
> >> > template="requests/ListRequests.cfm">
> >> >                                        <argument name="xe.list" 
> >> > value="requests.ListRequests"/>
> >> >                                        <argument name="xe.edit" 
> >> > value="requests.EditRequest"/>
> >> >                                </name>
> >> >                        </views>
> >> >                </event-handler>
>
> >> > My controller:
>
> >> >        <cffunction name="getRequests" output="false" hint="I am a message
> >> > listener function generated for the ""requests.ListRequests"" event.">
> >> >                <cfargument name="event" />
>
> >> >                <cfset arguments.event.setValue
>
> ...
>
> read more »

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
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/model-glue?hl=en

Reply via email to