I need to share a number of forms & want to be able to navigate (set the
selectedIndex) of an accordion within a form called as a component. Basic
break down of code is as follows:

<!-- [Accordion.mxml] -->
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml";
xmlns:sharedforms="com.company.veiw.sharedforms.*">

<mx:Accordion id="accProduct">
        
        <mx:VBox label="Product Details">
                <!-- product details form here -->
        </mx:VBox>
        
        <!-- get the shared security form -->
        <sharedforms:Security id="secuirty" label="Product Security"/>
        
</mx:Accordion>

</mx:Application>

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

<!-- [Securuty.mxml] -->
<?xml version="1.0" encoding="utf-8"?>

<mx:VBox xmlns:mx="http://www.macromedia.com/2003/mxml";>

<mx:Script>
<![CDATA[
        // display the previous accordion
        function previousStep(accordion)
        {
                accordion.selectedIndex -= 1;
        }
]]>
</mx:Script>

<mx:Button label="Previous Step" click="previousStep(super().accProduct)"/>

</mx:VBox>

The part I can't seem to get right is in the Securuty.mxml component. How do
I get it to navigate the parent accProduct accordion?

I have got has far as trying to call something like 'super().accProduct' but
it fails at runtime. 

Since Securuty.mxml is a shared form it will also need to be free of any
specific accordion 'id', I assume I can pass accProduct when I instantiate
it?

Am I using the right approach here or do I need to create some sort of
form/accordion management class?

Thank you for any suggestions.

Regards,
Malcolm



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