In our apps, we would like to refresh all the values in all related 
forms  based on a selected ID from a list. Each time we select a 
zone ID, all the children components must change their values.  I 
haven't figured out how to do so. Can you please help me…I feel that 
I must use the Dispatching but I don't get it yet on how to trigger 
a function in each component.

Here is the structure of the files.


NouveauProjet.mxml (this is the main apps)
<mx:Application……>

        <mx:ViewStack id="vsl">
                <EEfrm:zone_hallPEBC projectID="{projID}" 
id="zone_hallPEBC" zoneGenID="{zoneGenID}" target="{this}"/>
                <EEfrm:zone_hallMainPEBC id="zone_hallMainPEBC"/>
        ….


zone_hallPEBC.mxml
<mx:VBox….>

        function accessZone(choixZone:Object){
                _global.tempZone = choixZone;
                target.vsl.selectedIndex = 35;
        }

        <mx:List id="zones" width="100%" height="100%" 
dataProvider="{ecranRO.affichage.result}" labelField="Description" 
borderStyle="solid"/>
        <mx:Button id="accederButton" label="Accéder à la zone" 
click="must go to page and refresh all the values for all the 
viewStacks"/>

zone_hallMainPEBC.mxml
<mx:VBox…..>

        function initApp(){
                ecranRO.affichage(_global.tempZone.Building_Zone_ID);
        }


…..
        <mx:RemoteObject id="ecranRO"…>
                <mx:method name="affichage" >
                        <mx:arguments>
                                <zoneID>{choixZone.ZoneID}</zoneID>
                        </mx:arguments>
                </mx:method>    
        </mx:RemoteObject>

<mx:Accordion id="myAccordion" width="100%" height="100%" >
        <mx:TabNavigator label="Enveloppe">
        
                <EEfrm:MursExtPEBCFrm id="MursExtPEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}" />
                <EEfrm:FenestrationPEBCFrm id="FenestrationPEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}"/> 
                <EEfrm:ToiturePEBCFrm id="ToiturePEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}"/>

        </mx:TabNavigator>
        <mx:TabNavigator label="Équipements">
                <EEfrm:EclairagePEBCFrm id="EclairagePEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}" />
                <EEfrm:CuissonPEBCFrm id="CuissonPEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}"/>
                <EEfrm:EvacuaPEBCFrm id="EvacuaPEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}"/>
        </mx:TabNavigator>
        <EEfrm:CVCAPEBCFrm id="CVCAPEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}" label="CVCA"/>
        <EEfrm:RegulationPEBCFrm id="RegulationPEBCFrm" 
zoneID="{_global.tempZone.Building_Zone_ID}" label="Régulation"/>
</mx:Accordion>

MursExtPEBCFrm & FenestrationPEBCFrm & ToiturePEBCFrm & 
EclairagePEBCFrm & CuissonPEBCFrm & EvacuaPEBCFrm & CVCAPEBCFrm & 
RegulationPEBCFrm

<VBox….>

        function initApp(){
                ecranRO.affichage(_global.tempZone.Building_Zone_ID);
        }

……      .

        <mx:RemoteObject id="ecranRO"…>
                <mx:method name="affichage" >
                        <mx:arguments>
                                <zoneID>{choixZone.ZoneID}</zoneID>
                        </mx:arguments>
                </mx:method>    
        </mx:RemoteObject>

<mx:TextInput text="{ecranRO.result.input1}">

…….


Thanks for any help.


--- In flexcoders@yahoogroups.com, "Matt Chotin" <[EMAIL PROTECTED]> 
wrote:
> You're gonna have to provide more information than this.  Give 
everyone
> ids and you'll be able to reach them by dotting down.
> 
>  
> 
> <comp1:myComp1 id="mc1" />
> 
>  
> 
> <Subcomp2:mySubComp2 id="msc2" />
> 
>  
> 
> mc1.msc2.dispatchEvent({type: "change"});
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of Ghislain Simard
> Sent: Saturday, July 30, 2005 10:55 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] broadcasting to a sub-component
> 
>  
> 
> How to broadcast an event to a component inside a component?
> 
> main.mxml
> <comp1:myComp1/>
> 
> myComp1.mxml
> <Subcomp2:mySubComp2/>
> 
> mySubComp2.mxml
> 
> 
> 
> 
> --
> 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 
> 
>  
> 
> *      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]
subject=Unsubscribe> 
>         
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
>  
> 
> ________________________________




------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12h2hdld7/M=362329.6886308.7839368.1510227/D=groups/S=1705007207:TM/Y=YAHOO/EXP=1122937515/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to