0 Replies Latest reply on Oct 7, 2011 11:40 AM by Tangall

    Viewstack: defult index value for every click....

    Tangall

      Hello,

       

      I am experancing an issue..........

       

      I have a topmenu,with 5 linked button on it.This topmenu is common for all pages through out the application.When i click on the 1st button say Admin button which opens a home page from there we can navigat to different viewstacks.so now i am on viewstack index 3 and i clicked on 2nd button on topmenu say User then user tab has t own home page.So my problem here is that when i again go back to admin tool button i am directly viewing viewstack index 3 not the admin home page.My requirement is when a user clicks on any button in topmenu i should navigate to that partuclar button's home page.

       

      Thanks in advance.

       

      Here is the code below..

       

      Topmenu.mxml:

      <mx:ApplicationControlBar id="dockedBar" dock="false">

                                    <mx:HBox width="100%">

                                              <mx:LinkButton height="30" label="Admin Tools" labelPlacement="right" icon="@Embed('main/resources/images/AdminTools.png')"

                                                                               rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=0;"/>

      '

      '

      '

      <mx:ViewStack id='viewStack'>

                                    <mx:VBox height="100%" width="100%" horizontalScrollPolicy="off">

                                              <web:AdminTool width.EasyConfig="757" height.EasyConfig="599"/>

                                    </mx:VBox>

                                    <mx:VBox h..........

       

      Admintool.mxml:

       

      <mx:ViewStack id="viewStack" width="100%" height="100%">

                          <mx:VBox id="VB1" x="20" width="100%" height="100%"

                                               verticalGap.EasyConfig="10" horizontalScrollPolicy="off">

                                    <s:Form  >

                                              <s:Label  />

       

       

                                              <mx:HBox horizontalAlign="center">

                                                        <mx:LinkButton label="{ resourceManager.getString('resources', 'linkBtn_user_access_add_change_delete') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/UserAccess.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=1;" />

       

                                                        <mx:LinkButton label="{ resourceManager.getString('resources', 'linkBtn_status_displayed_on_the_logon_screen') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/Status.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=2;"/>

       

                                                        <mx:LinkButton label="{ resourceManager.getString('resources', 'linkBtn_maintain_loc_group') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/MaintainLoc.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=3;"/>

       

                                                        <mx:LinkButton label="{ resourceManager.getString('resources', 'linkBtn_view_reg_neat_tab') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/RegularNeatTables.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=4;"/>

                                              </mx:HBox>

                                              <s:Spacer height="20"/>

                                              <mx:HBox horizontalAlign="center">

                                                        <mx:LinkButton label="{ resourceManager.getString('resources', 'linkBtn_view_neat_services_lang_tab') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/NeatServices.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=5;"/>

       

                                                        <mx:LinkButton label="{ resourceManager.getString('resources', 'linkBtn_view_marketing_prg') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/MarketingPrograms.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=6"/>

       

                                                        <mx:LinkButton height="105" label="{ resourceManager.getString('resources', 'linkBtn_view_oth_tab') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/OtherTables.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=7"/>

       

                                                        <mx:LinkButton height="105" label="{ resourceManager.getString('resources', 'linkBtn_overwrite_loc_text') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/OtherTables.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="viewStack.selectedIndex=8"/>

       

                                                        <mx:LinkButton height="105" label="{ resourceManager.getString('resources', 'linkBtn_refresh_neat') }"

                                                                                         labelPlacement="bottom"  icon="@Embed('main/resources/images/OtherTables.png')"

                                                                                         rollOverColor="#B8D2F7" fontWeight="bold" click="clickHandler(event);"/>

                                              </mx:HBox>

                                    </s:Form>

                          </mx:VBox>

       

                          <mx:VBox height="100%" width="100%" horizontalScrollPolicy="off">

                                    <web:UserAccess width.EasyConfig="757" height.EasyConfig="599"/>

                          </mx:VBox>

       

                          <mx:VBox height="100%" width="100%" horizontalScrollPolicy="off">

                                    <web:UpdateStatus width.EasyConfig="757" height.EasyConfig="599"/>

                          </mx:VBox>

       

                          <mx:VBox height="100%" width="100%" horizontalScrollPolicy="off">

                                    <web:MaintainLocGroup width.EasyConfig="757" height.EasyConfig="599"/>

                          </mx:VBox>