<mx:Form id="form1" label="Form One" hide="saveForm(1)">
<comp:Comp1 id="comp1"/>
</mx:Form>
<mx:Form id="form2" label="Form Two" hide="saveForm(2)">
<mx:Label text="1"></mx:Label>
</mx:Form>
</mx:Accordion>
Ghislain Simard
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]On Behalf Of Philippe Maegerman
Sent: Thursday, August 25, 2005 3:40 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Accordion: save form on exitYou could also use your subComponents 'hide' events :<mx:Accordion>
<mx:Form id="form1" label="Form One" hide="saveForm(1)">
<mx:Label text="1"></mx:Label>
</mx:Form>
<mx:Form id="form2" label="Form Two" hide="saveForm(2)">
<mx:Label text="1"></mx:Label>
</mx:Form>
</mx:Accordion>Philippe MaegermanYou mean, when another view(form) inside an Accordion is selected you
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Abdul Qabiz
Sent: jeudi 25 août 2005 6:37
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Accordion: save form on exit
want to save the values in previously selected view(form)?
You can subscribe to Accordion's change event and do the appropriate.
Event object contains a propert(prevValue) which is zero-based index of
previously selected view inside the Accordion.
See the code below:-
<mx:Script>
function saveForm(whichForm:Number)
{
switch(whichForm)
{
case 0:
comp1.saveForm();
break;
case 1:
comp2.saveForm();
break;
}
}
</mx:Script>
<mx:Accordion change="saveForm(event.prevValue)">
<mx:Form id="form1" label="Form One">
<comp:Comp1 id="comp1"/>
</mx:Form>
<mx:Form id="form2" label="Form Two">
<comp:Comp2 id="comp2"/>
</mx:Form>
<mx:Accordion>
Comp1.mxml
function saveForm(){
saveRO.Save(myValues);//save values in the Database using RemoteObject
}
Hope it helps..
-abdul
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Ghislain Simard
Sent: Thursday, August 25, 2005 4:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Accordion: save form on exit
how can we get the form values saved on exit of a stack of an
Accordion? I have tried focusOut but no success.
I have a function inside each component (Comp1 and Comp2) which is
saving the values in a database.
<mx:Accordion >
<mx:Form id="form1" label="Form One">
<comp:Comp1/>
</mx:Form>
<mx:Form id="form2" label="Form Two">
<comp:Comp2/>
</mx:Form>
<mx:Accordion>
Comp1.mxml
function saveForm(){
saveRO.Save(myValues);//save values in the Database using RemoteObject
}
--
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
------------------------------------------------------------------
**STATEMENT OF CONFIDENTIALITY**This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited.
We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.
------------------------------------------------------------------
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Computer software testing | Macromedia flex | Development |
Software developer |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.