Yes

--- In [email protected], "Shannon Hicks" <[EMAIL PROTECTED]> wrote:
>
> Is getAllAsQuery() coming back properly?
>  
> Shan
> 
>   _____  
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of rumpleminzeflickr
> Sent: Thursday, December 21, 2006 12:41 AM
> To: [email protected]
> Subject: [flexcoders] Re: Second post: Really stuck on a problem 
which
> should be really easy? :(
> 
> 
> 
> Hi there,
> 
> Yes I have verified it is in the wwwroot folder, and can see it in 
> the services browser in flex 2 builder.
> 
> Here is the full code snippet. Thank you for having a look!
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Canvas initialize="pages.getAllAsQuery('page_name, 
> window_title');" xmlns:mx="http://www.adobe.
> <http://www.adobe.com/2006/mxml> com/2006/mxml" 
> width="100%" height="100%">
> 
> <mx:RemoteObject id="pages"
> destination="ColdFusion"
> source="kkmis.models.PagesGateway" >
> <mx:method name="get" result="dataHandler(event)"/>
> </mx:RemoteObject>
> 
> 
> 
> <mx:Script>
> <![CDATA[
> // import mx.data.messages.PagedMessage;
> import mx.rpc.events.ResultEvent;
> import mx.collections.ArrayCollection;
> import models.Pages;
> 
> // is used by Flex Builder 2 
> [Inspectable(defaultValue=true)]
> 
> [Bindable]
> public var voPage:Pages; 
> 
> private function dataHandler
> (event:ResultEvent):void
> {
> viewstack1.selectedChild = detail;
> voPage = event.result as models.Pages;
> } 
> 
> private function savePage():void
> {
> 
> pages.save(voPage);
> } 
> ]]>
> </mx:Script>
> 
> <mx:ViewStack creationPolicy="all" selectedIndex="1" 
> id="viewstack1" width="100%" height="100%" x="0" y="0">
> <mx:Canvas id="detail" label="details" 
> width="100%" height="100%" backgroundAlpha="0.59">
> <mx:Form x="0" y="0" 
> width="100%" height="100%">
> <mx:FormItem 
> label="Page name">
> 
> <mx:TextInput id="page_name" width="250" 
> text="{voPage.page_name}"/>
> </mx:FormItem>
> <mx:FormItem 
> label="Window title">
> 
> <mx:TextInput id="window_title" width="500" 
> text="{voPage.window_title}"/>
> </mx:FormItem>
> <mx:FormItem 
> label="Comment title">
> 
> <mx:TextInput id="comment_title" width="500" 
> text="{voPage.comment_title}"/>
> 
> </mx:FormItem>
> 
> 
> <mx:HBox 
> width="100%">
> 
> <mx:Button click="savePage();" label="Save changes" 
> id="save_changes"/>
> 
> <mx:Button click="viewstack1.selectedChild=list;" 
> label="Cancel" id="cancel"/>
> </mx:HBox>
> 
> </mx:Form> 
> 
> </mx:Canvas>
> 
> <mx:Canvas id="list" label="list" 
> width="100%" height="100%" top="0" >
> <mx:DataGrid doubleClick="pages.get
> (dg.selectedIndex + 1)" doubleClickEnabled="true" id="dg" 
> xmlns:mx="http://www.adobe. <http://www.adobe.com/2006/mxml> 
com/2006/mxml" 
> dataProvider="{pages.getAllAsQuery.lastResult}" top="0" bottom="0" 
> right="0" left="0"/> 
> </mx:Canvas>
> </mx:ViewStack>
> </mx:Canvas>
>


Reply via email to