Hi ,

....my prev code is to get the value from the InputSheet.mxml
textinput and display
it in the OutputSheet.mxml textinput. But when user changes its text
in inputName , those changes wouldnot reflect in printName as creation
complete will call only once in the lifecycle of the component....so
here is the code in such case.....

jus script block in main app and remaing is same...jus in this case u
want to register change event for inputName textinput to notice the
change of it.

<mx:Script>
                <![CDATA[
                        [Bindable]
                        private var printValue:String;

                        private function outPutInit():void{
                                printValue = inPut.inputName.text;
                                inPut.inputName.addEventListener(Event.CHANGE,
inputFieldChangeHandler)

                        }
                        private function 
inputFieldChangeHandler(event:Event):void{
                                printValue = inPut.inputName.text;
                        }

                ]]>
        </mx:Script>

regards,
Sukumar.

--------------------------------------------------------

On Nov 9, 1:41 pm, senling <[email protected]> wrote:
> Hi,
> I need to get the value from the InputSheet.mxml textinput and display
> it in the OutputSheet.mxml textinput. How can i achieve this while
> navigating the tab. The code is followed
>
> Mainapp.mxml  :
> ****************
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> xmlns:local="*">
>
> <mx:TabNavigator left="10" right="10" width="100%" height="100%"
> backgroundColor="#FFFFFF" borderStyle="none">
>               <local:InputSheet />
>               <local:OutputSheet/>
>
>   </mx:TabNavigator>
>
> </mx:Application>
>
> Two MXML Components :
> *******************************
> InputSheet.mxml :
> *****************
>   <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%"
> height="100%"
>          label="INPUT SHEET" creationComplete="onInit();">
>          <mx:TextInput id="inputName" />
>    </mx:Canvas>
>
> OutputSheet.mxml :
> ******************
>   <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%"
> height="100%"
>          label="OUTPUT SHEET" creationComplete="onInit();">
>
>          <mx:TextInput id="printName" />
>
>    </mx:Canvas>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" 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/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to