Is your f1d_agenID TextInput in an mxml component that is not actually an Application? This only works if you called your popup from the main application. If, however, you are calling the PopUp from an mxml component that is in another application, then I believe you should use parentDocument.f1d_agentId.text. However, I don’t see parentDocument working correctly, so I actually filed a bug on this yesterday.

 

Joan

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Rottman
Sent: Thursday, January 12, 2006 9:32 AM
To: [email protected]
Subject: [flexcoders] Re: Populating a text input from a pop up.

 

When I use the code below, I get this error.

ReferenceError: Error #1069: Property fld_agentId not found on hs2f
and there is no default value
      at custom.components.sv::Agent1Window/Agent1Window$564$private::a1Bind()
      at custom.components.sv::Agent1Window/__a1DG_click()

Flex code:
parentApplication.fld_agentId.text = a1DG.selectedItem.FLD_USERLOGIN;


--- In [email protected], "Joan Tan" <[EMAIL PROTECTED]> wrote:
>
> Jeremy,
>

>
> From your popup, you can reference anything in your main application by
> using the parentApplication property, so you would do something like:
>

>
> parentApplication.fld_agentId.text = newValue;
>

>
> I hope this helps.
>
> Joan
>

>
> ________________________________
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of Jeremy Rottman
> Sent: Wednesday, January 11, 2006 8:12 AM
> To: [email protected]
> Subject: [flexcoders] Populating a text input from a pop up.
>

>
> I am using a pop up for a user look up. When someone searches for a
> user and then clicks on the selected user, it is suposed to populate a
> text box on my main stage of my app. However, everything I have tried
> has failed. Can someone give me a hand with this. I have posted my
> code. Any help with this would be greatly appreciated.
>
>
> Pop Up:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Panel xmlns:mx="http://www.macromedia.com/2005/mxml"
> resizeEffect="Resize" xmlns="*" width="25%" height="25%" title="Agent
> Lookup">
> <mx:WebService id="srv" useProxy="false"
> wsdl="http://flex.homesmartagent.com/cfc/adminHS2F.cfc?wsdl"
> showBusyCursor="true" />
> <mx:Script source="as/adminAddList.as" />
>
>     <mx:Script>
>
>        private function a1Bind():Void
>         {
>               mx.managers.PopUpManager.removePopUp(this);
>                     }
>
>     </mx:Script>
>
>     <mx:Metadata>
>         [Event("a1Bind")]
>     </mx:Metadata>
>     <mx:states>
>         <mx:State name="results">
>             <mx:PropertyOverride property="width" value="45%"/>
>             <mx:PropertyOverride property="height" value="45%"/>
>             <mx:AddChild target="{canvas1}" position="lastChild">
>                 <mx:DataGrid id="a1DG" click="a1Bind()"
> dataProvider="{srv.qpAgentDisplay.result}">
>                     <mx:layoutConstraints>
>                         <mx:EdgeAnchor top="55" left="6" bottom="6"
> right="49"/>
>                     </mx:layoutConstraints>
>                     <mx:columns>
>                         <mx:DataGridColumn headerText="Agent ID"
> columnName="FLD_USERLOGIN"/>
>                         <mx:DataGridColumn headerText="First Name"
> columnName="FLD_FIRSTNAME"/>
>                         <mx:DataGridColumn headerText="Last Name"
> columnName="FLD_LASTNAME"/>
>                     </mx:columns>
>                 </mx:DataGrid>
>             </mx:AddChild>
>         </mx:State>
>     </mx:states>
>     <mx:Canvas width="100%" height="100%" id="canvas1">
>         <mx:Label text="Agent Name:" x="7" y="1"/>
>         <mx:TextInput x="7" y="22" id="search"/>
>         <mx:Button x="174" y="22"
> click="currentState='results';qpAgentDisplay(search.text)"
> label="Search"/>
>     </mx:Canvas>
>
> </mx:Panel>
>
>
> AS That calls pop up.
>
> // Agent Lookup 1
>
>           import mx.managers.PopUpManager;
>
>         private function showWindow1(modal:Boolean):Void
>         {
>             var agent1Window:Agent1Window = new Agent1Window();
>             var popup:Object = PopUpManager.popUpWindow(agent1Window,
> this, modal);
>               PopUpManager.centerPopUp(popup);      
>              
>         }
>        
>
> Text Input I want to populate:
>
> <mx:TextInput x="18" y="74" id="fld_agentId"/>
>
>
>
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
>
> SPONSORED LINKS
>
> Web site design development
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+
> site+design+development&w2=Computer+software+development&w3=Software+des
> ign+and+development&w4=Macromedia+flex&w5=Software+development+best+prac
> tice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ> 
>
> Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=We
> b+site+design+development&w2=Computer+software+development&w3=Software+d
> esign+and+development&w4=Macromedia+flex&w5=Software+development+best+pr
> actice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw> 
>
> Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=
> Web+site+design+development&w2=Computer+software+development&w3=Software
> +design+and+development&w4=Macromedia+flex&w5=Software+development+best+
> practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ> 
>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+
> development&w2=Computer+software+development&w3=Software+design+and+deve
> lopment&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=1
> 66&.sig=OO6nPIrz7_EpZI36cYzBjw> 
>
> Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&
> w1=Web+site+design+development&w2=Computer+software+development&w3=Softw
> are+design+and+development&w4=Macromedia+flex&w5=Software+development+be
> st+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw> 
>

>

>
> ________________________________
>
> YAHOO! GROUPS LINKS
>

>
> *      Visit your group "flexcoders
> <http://groups.yahoo.com/group/flexcoders> " on the web.
>        
> *      To unsubscribe from this group, send an email to:
>       [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>        
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> .
>

>
> ________________________________
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to