function changeSelection(event) {
mychildComponent.someObjectVar
= event.target.selectedItem;
}
Quote: "pass a reference
to it into the component."
my parentDocument value that I would like to pass
is from a
ComboBox. How can I pass the selectedItem to
the child component:
parent Component:
<mx:ComboBox id="typeCvca"
dataProvider="{typeCombo.fr.system}"
change="changeSelection(event);changeCompBehav(event)"/>
thanks
--- In [email protected],
"Tracy Spratt" <[EMAIL PROTECTED]>
wrote:
> Try:
> parentDocument.comp1.selectedItem.data
>
> Or, if you are going to do a lot with the
parent component, pass a
> reference to it into the component. Be
sure to type the
declaration
> explicitly if you plan to bind through the
reference.
>
> Tracy
>
> -----Original Message-----
> From: [email protected]
[mailto:[email protected]]
On
> Behalf Of Ghislain Simard
> Sent: Wednesday, September 21, 2005 4:10 PM
> To: [email protected]
> Subject: [flexcoders] Access to parent
control in parent component
>
> If I want to get the value of a ComboBox's
selectedItem coming
from the
> parent component. How to do so?
>
>
> I've tried this without success:
> switch (_parent.comp1.selectedItem.data){
> case 1:
>
do this...
>
break;
> case 2:
>
do that...
>
break;
> }
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ:
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.com
> Yahoo! Groups Links
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Re: Access to parent control in parent compo... Kelly
-