TabNavigator & States

I have a TabNavigator and I want to use states to select
which component is showing in each tab. Each tab has 4 different
components. Is this feasible or am I just crazy? It looks like it
is only working on the first tab, because when it is initialized
the state is set. In the other tabs, it doesn't appear that the
state is affected.
Please help!

After re-reading this, you could try making a custom
component, which has the four components you want in it. Then
programmatically set their visibility and includeInLayout to true
or false.
Use multiple instances of these components for the children
of your tabNavigator. By virtue of them being separate components
they should keep their state when you switch around between them.
Like this:
<mx:TabNavigator>
<custom:customComponent hiddenValues="{whichOnesToHide1}"
/>
<custom:customComponent hiddenValues="{whichOnesToHide2}"
/>
<custom:customComponent hiddenValues="{whichOnesToHide3}"
/>
</mx:TabNavigator>
This might be a little closer to what you're looking
for.

Similar Messages

  • Old Flex App suddenly has an error?

    We have several custom Dashboards we wrote in Flex 3 several months ago which are deployed with various customers around the country.  Haven't done anything in Flex for about six months, until recently when I was tasked to customize another one of these Dashboards for a new customer.
    Much to my surprise I found that when I ran my Dashboard from Flex Developer I get an error, apparently due to a drawing method drawRect().  Luckily for me this error only appears when I run from Flex Developer, when I compile the App it runs fine.
    I now need to determine the source / cause of this error, which apparently is being caused by one of the Components we use in the Application, some Degrafa stuff and a Treemap component to which we don't have all of the source code.  I may have to find the answer in some other site (where we found the components) but I'd like some insight into what is happening here.
    I would also very much like someone more skilled than I am with Flex (I am a beginner Flex programmer myself) to explain to me why an Application which worked fine for almost a year would suddenly develop a problem in the code which did not exist before?   This kind of thing would not happen with the other software development tools we use.
    This is the error I got.
    ArgumentError: Error #2004: One of the parameters is invalid.
    at flash.display::Graphics/drawRect()
    at mx.skins::ProgrammaticSkin/drawRoundRect()[C:\autobuild\3.2.0\frameworks\projects\framewo rk\src\mx\skins\ProgrammaticSkin.as:739]
    at mx.skins.halo::TabSkin/updateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framewo rk\src\mx\skins\halo\TabSkin.as:397]
    at mx.skins::ProgrammaticSkin/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\f ramework\src\mx\skins\ProgrammaticSkin.as:421]
    at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\f ramework\src\mx\managers\LayoutManager.as:622]
    at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects \framework\src\mx\managers\LayoutManager.as:677]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8628]
    at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8568]
    Any help would be veyr appreciated.
    Jean

    This is my TabNavigator statement:
    <mx:TabNavigator 
    x="50" y="15" width="94%" height="90%" backgroundColor="#FFFFFF" horizontalAlign="center" tabWidth="
    {this.width * 0.32}" creationPolicy="all"> 
    Is the tabWidth a problem now possibly due to some change in IE 8?
    D

  • How can I initialize all TabNavigator Tabs upon a state change?

    Here's the basic goal. I want to provide two views to the
    user that display the same panels. I configured each view as a
    separate state but I am having trouble initializing each of the tab
    views since they are only created by Flex when the user first
    selects it. I need them all created when the user changes to that
    state so that I can insert my view objects. Does that make sense?
    Ok, how about an example program. I define three view objects
    in ActionScript which will be used in two different states. I use
    AddChild to put them in the proper layout location. The problem is
    with the Tab state. The AddChild operation only works for the first
    tab because it is visible. The other two tabs don't get setup
    properly. Can anyone help me resolve this?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical"
    creationComplete="onCreationComplete()">
    <mx:Script>
    <![CDATA[
    import mx.containers.VBox;
    import mx.controls.Label;
    [Bindable] public var view1:VBox;
    [Bindable] public var view2:VBox;
    [Bindable] public var view3:VBox;
    private function onCreationComplete():void
    var label1:Label = new Label();
    var label2:Label = new Label();
    var label3:Label = new Label();
    label1.text = "This is view 1.";
    label2.text = "This is view 2.";
    label3.text = "This is view 3.";
    view1 = new VBox();
    view1.label = "View 1";
    view1.addChild(label1);
    view2 = new VBox();
    view2.label = "View 2";
    view2.addChild(label2);
    view3 = new VBox();
    view3.label = "View 3";
    view3.addChild(label3);
    currentState = "wizardState";
    private function changeState():void
    switch(stateBox.selectedItem.data)
    case 0: currentState = 'wizardState'; break;
    case 1: currentState = 'tabState'; break;
    ]]>
    </mx:Script>
    <mx:Panel id="mainPanel" title="Tab View Bug" width="400"
    height="320"/>
    <mx:ComboBox id="stateBox" change="changeState()">
    <mx:dataProvider>
    <mx:Object label="Wizard" data="0"/>
    <mx:Object label="Tabbed" data="1"/>
    </mx:dataProvider>
    </mx:ComboBox>
    <mx:states>
    <mx:State name="wizardState">
    <mx:AddChild relativeTo="{mainPanel}"
    position="lastChild">
    <mx:HBox width="100%" height="100%"
    verticalAlign="top">
    <mx:ToggleButtonBar id="wizardButtonBar" width="20%"
    direction="vertical"
    dataProvider="{wizardViewStack}"/>
    <mx:ViewStack id="wizardViewStack" width="80%"
    selectedIndex="{wizardButtonBar.selectedIndex}"/>
    </mx:HBox>
    </mx:AddChild>
    <mx:AddChild target="{view1}"
    relativeTo="{wizardViewStack}" position="lastChild"/>
    <mx:AddChild target="{view2}"
    relativeTo="{wizardViewStack}" position="lastChild"/>
    <mx:AddChild target="{view3}"
    relativeTo="{wizardViewStack}" position="lastChild"/>
    </mx:State>
    <mx:State name="tabState">
    <mx:AddChild relativeTo="{mainPanel}"
    position="lastChild">
    <mx:TabNavigator id="tabViewStack" width="100%"
    height="100%">
    <mx:VBox label="Tab 1" id="tab1"/>
    <mx:VBox label="Tab 2" id="tab2"/>
    <mx:VBox label="Tab 3" id="tab3"/>
    </mx:TabNavigator>
    </mx:AddChild>
    <mx:AddChild target="{view1}" relativeTo="{tab1}"
    position="lastChild"/>
    <mx:AddChild target="{view2}" relativeTo="{tab2}"
    position="lastChild"/>
    <mx:AddChild target="{view3}" relativeTo="{tab3}"
    position="lastChild"/>
    </mx:State>
    </mx:states>
    </mx:Application>

    Ok, here is an even simpler scenario. I take each view from
    the default state and put them in the new tab view when the state
    changes. If you compile and run this example, the only view that
    makes it into the tabview is the one that was active when the state
    changed. Why is that?
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="vertical">
    <mx:Script>
    <![CDATA[
    private function changeState():void
    switch(stateBox.selectedItem.data)
    case 0: currentState = ''; break;
    case 1: currentState = 'tabState'; break;
    ]]>
    </mx:Script>
    <mx:Panel id="mainPanel" title="Tab View Bug" width="400"
    height="320">
    <mx:HBox id="wizardView" width="100%" height="100%"
    verticalAlign="top">
    <mx:ToggleButtonBar id="wizardButtonBar" width="20%"
    direction="vertical"
    dataProvider="{wizardViewStack}"/>
    <mx:ViewStack id="wizardViewStack" width="80%"
    selectedIndex="{wizardButtonBar.selectedIndex}"
    creationPolicy="all">
    <mx:Canvas id="view1" label="Part 1" >
    <mx:TextInput text="This is view 1"/>
    </mx:Canvas>
    <mx:Canvas id="view2" label="Part 2">
    <mx:TextInput text="This is view 2"/>
    </mx:Canvas>
    <mx:Canvas id="view3" label="Part 3">
    <mx:TextInput text="This is view 3"/>
    </mx:Canvas>
    </mx:ViewStack>
    </mx:HBox>
    </mx:Panel>
    <mx:ComboBox id="stateBox" change="changeState()">
    <mx:dataProvider>
    <mx:Object label="Wizard" data="0"/>
    <mx:Object label="Tabbed" data="1"/>
    </mx:dataProvider>
    </mx:ComboBox>
    <mx:states>
    <mx:State name="tabState">
    <mx:AddChild relativeTo="{mainPanel}"
    position="lastChild">
    <mx:TabNavigator id="tabView" width="100%" height="100%"
    creationPolicy="all">
    <mx:Canvas label="Tab 1" id="tab1"/>
    <mx:Canvas label="Tab 2" id="tab2"/>
    <mx:Canvas label="Tab 3" id="tab3"/>
    </mx:TabNavigator>
    </mx:AddChild>
    <mx:RemoveChild target="{view1}"/>
    <mx:AddChild target="{view1}" relativeTo="{tab1}"/>
    <mx:RemoveChild target="{view2}"/>
    <mx:AddChild target="{view2}" relativeTo="{tab2}"/>
    <mx:RemoveChild target="{view3}"/>
    <mx:AddChild target="{view3}" relativeTo="{tab3}"/>
    <mx:RemoveChild target="{wizardView}"/>
    </mx:State>
    </mx:states>
    </mx:Application>

  • TabNavigator  is keeping the previous state

    Greetings everybody,
    I have a tab navigator on my project. The content of each tab is long enough that you need to scroll down to see all content. The issue here isd that when you go to the end of page (tab) to select something and then you switch between tabs and go back to the specified tab the screen shows the end of page (the way you left it). As per customer requirement, she wants the page to show always from top.
    I hope the problem is clear and I hope that you can find a solution.
    Regards,

    I had a similar need when changing states using spark scroller.
    I basically just set the viewport vertical scroll position to the top.
    myScroller.viewport.verticalScrollPosition = 0;
    not sure if you are using  Flex 4.5 or not or if you have scrollers.  Can't remember of hand how to access the scroller in mx:TabNavigator, but the concept of setting scroll position should be possible.
    I put my own scroller inside each NavigatorContent then use the line above to set the scroller to top.
    <mx:TabNavigator   id="tn" width="100%" height="100%" creationPolicy="all">
      <s:NavigatorContent  id="formTab" label="Form">
                        <s:Scroller id="formScroll"   width="100%" height="100%" >
                        <s:Group  width="100%" height="100%"  >
    Don

  • Selecting View States and TabNavigator Canvases

    Hello all Flex fans...
    I have two questions for somebody who has done this before.
    It will take a bit of explaining so bear with me.
    I have a datagrid called "selClaimant" as the starting point
    of my application. When I select something from the selClaimant
    datagrid I change view states to a view called "ClaimView". In the
    ClaimView state I have a TabNavigator control with several canvases
    called "Claimant" and "Claims" and several others.
    My first question is when I select something from the
    selClaimant datagrid how do I ensure that the Claimant canvas is
    displayed in the TabNavigator and not the Claims canvas???
    My second question is similar to the first but with a twist.
    First off the Claims canvas also has two view states (call them
    "ViewOne" and "ViewMany"). ViewOne has a datagrid control called
    selClaim that allows me to select a claim that has been filed by
    the claimant. ViewMany allows me to see all the details about the
    selected claim. When I select a claimant from the selClaimant
    datagrid I query the database to see how many claims that the
    selected claimant has filed. If there has only been one claim filed
    I want the starting state to be the ViewMany canvas when the user
    clicks on the Claims TabNavigator. If there is more than one claim
    in the database then I want the ViewOne to be displayed so I can
    select which claim I want the detail on.
    I store the number of claims in an array so I can use the
    array length to see if I have one or more claims but I am not sure
    how to logically force my view state and canvas state.
    Thanks in advance to the guru that helps me with this one!!!
    Have an Ordinary Day...
    KomputerMan ~|:-)

    Question one is answered... put this into the action script
    that handles the datagrid selected event.
    claimantTabNav.selectedIndex = 0;
    claimantTabNavigator is the ID of the tabnavigator whose
    canvas I want selected. 0 is the first tab in the navigator. Good
    thing I grew up on UNIX and can still remember how to count
    starting with a 0 instead of a 1. :)
    Have an Ordinary Day...
    KomputerMan ~|:-)

  • Need help with container display / states

    Greetings!
    I am trying to use states to change the contents of a canvas
    which is the second of two within a tab navigator. Buttons trigger
    functions to change the state and change the selectedIndex of the
    navigator to the second tab.
    The functions work fine if you first view the second tab. If
    you click the buttons before viewing the second tab, the whole
    thing blows up. Heres a link to app:
    http://test.arsandbox.com/player.cfm
    Any insight would be appreciated!
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initApp();">
    <mx:Script><![CDATA[
    private function initApp():void {
    private function displayDirectory():void {
    switchTab();
    currentState = "stateDirectory";
    private function displayWriter(selectedWriter:String):void {
    currentState = "stateWriter";
    switchTab();
    private function displaySong(selectedSong:String):void {
    currentState = "stateSong";
    switchTab();
    private function switchTab():void {
    ContentTabs.selectedIndex = 1;
    ]]></mx:Script>
    <mx:states>
    <mx:State name="stateDirectory">
    <mx:SetProperty target="{directoryBox}" name="visible"
    value="true"/>
    <mx:SetProperty target="{writerBox}" name="visible"
    value="false"/>
    <mx:SetProperty target="{songBox}" name="visible"
    value="false"/>
    </mx:State>
    <mx:State name="stateWriter">
    <mx:SetProperty target="{directoryBox}" name="visible"
    value="false"/>
    <mx:SetProperty target="{writerBox}" name="visible"
    value="true"/>
    <mx:SetProperty target="{songBox}" name="visible"
    value="false"/>
    </mx:State>
    <mx:State name="stateSong">
    <mx:SetProperty target="{directoryBox}" name="visible"
    value="false"/>
    <mx:SetProperty target="{writerBox}" name="visible"
    value="false"/>
    <mx:SetProperty target="{songBox}" name="visible"
    value="true"/>
    </mx:State>
    </mx:states>
    <mx:Panel id="MainPanel" width="100%" height="100%"
    layout="horizontal" title="Example" horizontalAlign="center"
    verticalAlign="middle" backgroundColor="0xB3C0C6">
    <mx:DividedBox direction="horizontal" width="100%"
    height="100%">
    <mx:VBox width="250" height="100%"
    backgroundColor="#ffffff">
    <mx:Button label="Directory"
    click="displayDirectory();"/>
    <mx:Button label="Writer"
    click="displayWriter('1');"/>
    <mx:Button label="Song" click="displaySong('1');"/>
    </mx:VBox>
    <mx:TabNavigator id="ContentTabs" width="100%"
    height="100%" visible="true">
    <mx:Canvas label="Homepage" width="100%" height="100%"
    horizontalScrollPolicy="off">
    </mx:Canvas>
    <mx:Canvas label="Writers" width="100%" height="100%"
    horizontalScrollPolicy="off">
    <mx:VBox id="directoryBox" width="100%" height="100%"
    visible="true" top="0" left="0">
    <mx:Label text="Directory Box"/>
    </mx:VBox>
    <mx:VBox id="writerBox" width="100%" height="100%"
    visible="false" top="0" left="0">
    <mx:Label text="Writer Box"/>
    </mx:VBox>
    <mx:VBox id="songBox" width="100%" height="100%"
    visible="false" top="0" left="0">
    <mx:Label text="Song Box"/>
    </mx:VBox>
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:DividedBox>
    </mx:Panel>
    </mx:Application>

    The items in the second tab aren't actually created or
    instantiated until they are first viewed. This is a performance
    setting built into Flex. You can however over-ride the setting and
    force all the tab contents to render immediately when the tab
    navigator is created. To do this, you define the creationPolicy on
    the TabNavigator and set the value to "all". Warning, this will
    hurt performance if the tab navigator has a lot of large child
    items.

  • Access States in Modules

    Hello, I am having trouble accessing states in a module.
    Knowing that my application would grow, I have started to modularise right away. For a simpel case, let us take the example from this website:
    http://evontech.com/forum-need-help/topic/875.html
    We have the Main.mxml and two mxml files (MainView and LoginView).
    Main.mxml:
    <?xml version="1.
    0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:view="view.*">
      <mx:TabNavigator>
          <view:LoginView />
          <view:MainView />
      </mx:TabNavigator>
    </mx:Application>
    Now, assume that have a state named StateB in MainView, and a button in LoginView. When I click on the button in LoginView, I was StateB in Mainview to open. How do I do that?
    This is the snippet from LoginView:
    protected function addBtn_clickHandler(event:MouseEvent):void
    currentState = "StateB";
    Thank you very much.

    Hello, I am having trouble accessing states in a module.
    Knowing that my application would grow, I have started to modularise right away. For a simpel case, let us take the example from this website:
    http://evontech.com/forum-need-help/topic/875.html
    We have the Main.mxml and two mxml files (MainView and LoginView).
    Main.mxml:
    <?xml version="1.
    0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:view="view.*">
      <mx:TabNavigator>
          <view:LoginView />
          <view:MainView />
      </mx:TabNavigator>
    </mx:Application>
    Now, assume that have a state named StateB in MainView, and a button in LoginView. When I click on the button in LoginView, I was StateB in Mainview to open. How do I do that?
    This is the snippet from LoginView:
    protected function addBtn_clickHandler(event:MouseEvent):void
    currentState = "StateB";
    Thank you very much.

  • How to Dynamically Display Different ViewStack component without using State?

    I have a type column in a datagrid record, when type = A, I want to display ViewStack A, when type = B, I want to display ViewStack B, any body can give me some clues? sample code is best. Thanks a lot. BTW, I don't want to use state to control them, as both ViewStacks are already within the same application state.

    hi,
    you can try something like this.....
    David.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.events.ListEvent;
    [Bindable] private var arr:ArrayCollection = new ArrayCollection([
    {info:"record 1", type:"A"},
    {info:"record 2", type:"B"},
    {info:"record 3", type:"A"},
    {info:"record 4", type:"B"}
    protected function dg_changeHandler(event:ListEvent):void
    if (arr[dg.selectedIndex].type=="A") tn1.visible = true else tn1.visible = false;
    tn2.visible = !tn1.visible;
    ]]>
    </mx:Script>
    <mx:DataGrid id="dg" x="279" y="239" dataProvider="{arr}" change="dg_changeHandler(event)">
    <mx:columns>
    <mx:DataGridColumn headerText="Info" dataField="info"/>
    <mx:DataGridColumn headerText="Type" dataField="type"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:TabNavigator x="279" y="408" width="200" height="200" id="tn1">
    <mx:Canvas label="Tab 1" width="100%" height="100%">
    </mx:Canvas>
    </mx:TabNavigator>
    <mx:TabNavigator x="507" y="408" width="200" height="200" id="tn2">
    <mx:Canvas label="Tab 1" width="100%" height="100%">
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Application>

  • Problem with tabnavigator index change effect

    Hello All,
         I am using
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" horizontalAlign="center">
    <mx:TabNavigator id="tabNav" height="600" width="600" change="onTabChange(event)">
    <mx:VBox horizontalAlign="center" verticalAlign="middle" height="100%" width="100%" label="Tab 1">
    <mx:Label text="Tab 1" fontSize="30" />
    </mx:VBox>
    <mx:VBox horizontalAlign="center" verticalAlign="middle" height="100%" width="100%" label="Tab 2">
    <mx:Label text="Tab 2" fontSize="30" />
    </mx:VBox>
    <mx:VBox horizontalAlign="center" verticalAlign="middle" height="100%" width="100%" label="Tab 3">
    <mx:Label text="Tab 3" fontSize="30" />
    </mx:VBox>
    <mx:VBox horizontalAlign="center" verticalAlign="middle" height="100%" width="100%" label="Tab 4">
    <mx:Label text="Tab 4" fontSize="30" />
    </mx:VBox>  
    </mx:TabNavigator>
    <mx:Script>
    <![CDATA[
    import mx.effects.Move;
    import mx.events.IndexChangedEvent;
    import mx.events.EffectEvent;
    public function onTabChange(event:IndexChangedEvent):void
    var oldTab:DisplayObject = tabNav.getChildAt(event.oldIndex);
    var newTab:DisplayObject = tabNav.getChildAt(event.newIndex);
    var moveEffect:Move = new Move();
    moveEffect.target = oldTab;
    var moveEffect2:Move = new Move();
    moveEffect2.target = newTab;
    if(event.oldIndex > event.newIndex)
    //Moving old Tab out to the right, new tab in from the left
    oldTab.x = 0;
    moveEffect.xTo = oldTab.width + 100;
    moveEffect.yFrom = oldTab.y;
    moveEffect.yTo = oldTab.y;
    newTab.x = -oldTab.width;
    moveEffect2.xTo = 0;
    moveEffect2.yFrom = oldTab.y;
    moveEffect2.yTo = oldTab.y;
    else
    //Moving old Tab out to the left, new tab in from the right
    oldTab.x = 0;
    moveEffect.xTo = -oldTab.width;
    moveEffect.yFrom = oldTab.y;
    moveEffect.yTo = oldTab.y;
    newTab.x = oldTab.width + 100;
    moveEffect2.xTo = 0;
    moveEffect2.yFrom = oldTab.y;
    moveEffect2.yTo = oldTab.y;
    oldTab.visible = true;
    newTab.visible = true;
    moveEffect2.play();
    moveEffect.addEventListener(EffectEvent.EFFECT_END,tabOffScreen);
    moveEffect.play();
    private function tabOffScreen(event:EffectEvent):void
    event.target.removeEventListener(EffectEvent.EFFECT_END,tabOffScreen);
    event.target.target.visible = false;
    ]]>
    </mx:Script></mx:Application>
    to run the slide effect in flash builder 4.5 with sdk 4.5. When the effect plays, the selected child behaves abnormal whereas when it runs with sdk 3.6 in flash builder 4.5, everything goes well.
    Any help will be apppreciated.
    -Thanks and regards
    Vishal Kumar

    Hi Biebel37,
    I was able to get a runtime error with a test app I wrote
    doing something similar to what you described. I think what you're
    doing should be legal, so it may be an SDK bug, but I'll file it
    and see if the SDK team agrees :)
    One workaround that might work for you would be to make it so
    that instead of creating the TabNavigator in a given state (using
    AddChild), you put it in the base state, but set visible="false".
    Then, in the state where you want it to appear, use <SetProperty
    target="{nav}" name="visible" value="true"/>. (Depending on how
    you're doing your layout, you may need to set
    includeInLayout="false" in the base state and set it to true in the
    other state as well.) In my test app, this avoids the runtime
    error.
    Thanks,
    nj
    Flex Builder team

  • TabNavigator change

    I employ a TabNavigator container in my site and there are
    three tabs; T1, T2 and T3. When T1 is clicked, I change the
    currentState to S1 and in that window, I have a button "play" which
    when I click, starts a video window and plays a file. Midway thru
    that play back, I click T2 and I have coded it to change state to
    S2. I get my job done in S2 and I click back to T1, it takes me to
    the video playback screen which is playing that file. I want it to
    go to the first state S1 which has a screen that displays the
    "play" button. Can someone help me with this issue? Thanks,
    Ramesh

    Mainmanian - I think that if you are using states that you
    could set the default state in a function based on the
    selectedIndex of the tabNavigator on a change event on the
    tabNavigator. Good Luck.
    I believe I have the same issue. Basically the child objects
    under a TabNavigator page are not reset to their initial state once
    they have been accessed. For example, if there are 2 tabs on the
    tabNavigator - T1 has a canvas with some test objects on it, T2 has
    a canvas with a swf movie on it. When T2 is selected, the swf loads
    and begins playing, then if T1 is selected the text objects are
    viewed, then if T2 is selected again the swf movie is still playing
    as if it had always been selected instead of stopping when focus
    was lost when T1 was selected. Basically, how does one reset the
    contents of a tab to it's original state, so that each time a user
    selects that tab any actions previously taken are lost or reset. In
    my case, the swf movie would reset and start from the beginning. In
    Mainmanian's case, he wants the movie to be removed and the button
    to control reloading it.

  • TabNavigator Problem

    Hi I have quite a complex component within my Flex 2
    application….
    The component consists of numerous tabs within a
    tabNavigator… and each tab contains a dataGrid that displays
    data from a webService relevant to the selected tab.
    This is quite difficult for me to explain in words so I will
    apologise in advance if it makes no sense, but I will give it a
    go…..
    The tabs work fine, and the dataGrids are populated when the
    tabs are changed… when a tab is selected, it passes a
    variable to the web service which then pulls back and displays in
    the dataGrid all relevant data to the sent variable etc….
    Each tab within the tabNavigator contains a different /
    separate dataGrid with a unique name / ID!
    The problem that I am having is when you change the tabs
    quickly, its as if the web service cant keep up and is getting
    confused as to what data to display in what dataGrid
    etc……. although if you move through more slowly it
    works perfectly.
    I thought that maybe a “quick fix” to this is
    maybe to disable elements / tabs within the component until the web
    service has completed loading therefore not allowing the user to
    change tabs (as they are disabled) until the dataGrid has been
    loaded etc….. but I don’t know how to do this :(
    Does anyone know how I can go about doing this, or if there
    is another solution to my problem? - Any suggestions?
    Thanks,
    Jon.

    Hi Biebel37,
    I was able to get a runtime error with a test app I wrote
    doing something similar to what you described. I think what you're
    doing should be legal, so it may be an SDK bug, but I'll file it
    and see if the SDK team agrees :)
    One workaround that might work for you would be to make it so
    that instead of creating the TabNavigator in a given state (using
    AddChild), you put it in the base state, but set visible="false".
    Then, in the state where you want it to appear, use <SetProperty
    target="{nav}" name="visible" value="true"/>. (Depending on how
    you're doing your layout, you may need to set
    includeInLayout="false" in the base state and set it to true in the
    other state as well.) In my test app, this avoids the runtime
    error.
    Thanks,
    nj
    Flex Builder team

  • Number of states vs more .mxml files

    I am trying th figure out the best approach.  After login I change states and have a menu that can do is 7 different direction based on selection.
    What is the advantage/disadvantage of changing the state of the current .mxml file verses having 7 different mxml files?
    Thanks,
    Pete

    Right now I am developing an application and I have my main application with the following components.
    AppHeader
    AppFooter
    AppContent
    Then the AppContent MXML file contains many states for the different menus, around 7.
    These states show one at a time using a TabNavigator to display the content is the one section of the screen.
    One of the states has another set of nested components
    Right now I am having a VERY difficult time getting information into my database. I think it is because of the number of states and components. I am coming to believe that you have to be at the application mxml file to send information but I could be wrong. The only problem with components and state nesting is that it can get out of control quickly. It might better to refactor the application. I plan on doing this after the initial assessment from my managers.

  • And/or if statement in rtf templates.

    Hi all,
    I'm using XML Publisher 4.5.
    I have created a word template file (rtf) for my reports. I need to be able to show some content in the template file by using and and/or if statement.
    fx. <?if:doc_type='STANDARD'?> OR <?if:doc_type='DEFAULT'?>
    How can I do this?
    In advance thank you.
    Best regards
    Kenneth

    Hi D,
    Thank you for your answer.
    I have seriously thought about that solution; but I don't think it's a smart way to do it.
    If i do it like that, i need to copy the whole table and paste it inside the if statements.
    I have two xml elements that I need to make the decisions on. POH_PO_TYPE & CP_RELEASE_NUM.
    POH_PO_TYPE can be: STANDARD, RELEASE or BLANKET.
    CP_RELEASE_NUM can be: '' or N
    If POH_PO_TYPE is RELEASE AND CP_RELEASE_NUM is not ''
    OR POH_PO_TYPE is STANDARD
    OR POH_PO_TYPE is BLANKET AND CP_RELEASE_NUM is ''
    THEN show table (which contains the whole PO).
    It shall show the content of the PO in any of these cases.
    BR Kenneth

  • Filename in import statement

    Hi srinivas bobbala,
    Thank you for your response.But I think my quesition was not clear.My ques... is for suppose there is one datafile for importing like.. "datafile_21" Here my intention is it takes file from datafile_21 only but it appears in import statement like datafile_21<<curmon>>.
    import database sample.sample data from data_file "c:\\ABC\datafile_21_AUG.txt" using server rules_file datafile on error abort;
    In this it takes datafile from datafile_21.But it appears like datafile_21_AUG in import statement.This AUG coming from batch file.
    Essmsh c:\\ABC\loadmxl.mxl %curmon%

    No it is not possible.
    I assume the data file "datafile_21" is first renamed to datafile_21_${CurrMth} in the batchscript.
    After that this data file *datafile_21_${CurrMth}* is pointed in the import statement.
    In the logs you will see this file as datafile_21_Aug.

  • Help with if statement in cursor and for loop to get output

    I have the following cursor and and want to use if else statement to get the output. The cursor is working fine. What i need help with is how to use and if else statement to only get the folderrsn that have not been updated in the last 30 days. If you look at the talbe below my select statement is showing folderrs 291631 was updated only 4 days ago and folderrsn 322160 was also updated 4 days ago.
    I do not want these two to appear in my result set. So i need to use if else so that my result only shows all folderrsn that havenot been updated in the last 30 days.
    Here is my cursor:
    /*Cursor for Email procedure. It is working Shows userid and the string
    You need to update these folders*/
    DECLARE
    a_user varchar2(200) := null;
    v_assigneduser varchar2(20);
    v_folderrsn varchar2(200);
    v_emailaddress varchar2(60);
    v_subject varchar2(200);
    Cursor c IS
    SELECT assigneduser, vu.emailaddress, f.folderrsn, trunc(f.indate) AS "IN DATE",
    MAX (trunc(fpa.attemptdate)) AS "LAST UPDATE",
    trunc(sysdate) - MAX (trunc(fpa.attemptdate)) AS "DAYS PAST"
    --MAX (TRUNC (fpa.attemptdate)) - TRUNC (f.indate) AS "NUMBER OF DAYS"
    FROM folder f, folderprocess fp, validuser vu, folderprocessattempt fpa
    WHERE f.foldertype = 'HJ'
    AND f.statuscode NOT IN (20, 40)
    AND f.folderrsn = fp.folderrsn
    AND fp.processrsn = fpa.processrsn
    AND vu.userid = fp.assigneduser
    AND vu.statuscode = 1
    GROUP BY assigneduser, vu.emailaddress, f.folderrsn, f.indate
    ORDER BY fp.assigneduser;
    BEGIN
    FOR c1 IN c LOOP
    IF (c1.assigneduser = v_assigneduser) THEN
    dbms_output.put_line(' ' || c1.folderrsn);
    else
    dbms_output.put(c1.assigneduser ||': ' || 'Overdue Folders:You need to update these folders: Folderrsn: '||c1.folderrsn);
    END IF;
    a_user := c1.assigneduser;
    v_assigneduser := c1.assigneduser;
    v_folderrsn := c1.folderrsn;
    v_emailaddress := c1.emailaddress;
    v_subject := 'Subject: Project for';
    END LOOP;
    END;
    The reason I have included the folowing table is that I want you to see the output from the select statement. that way you can help me do the if statement in the above cursor so that the result will look like this:
    emailaddress
    Subject: 'Project for ' || V_email || 'not updated in the last 30 days'
    v_folderrsn
    v_folderrsn
    etc
    [email protected]......
    Subject: 'Project for: ' Jim...'not updated in the last 30 days'
    284087
    292709
    [email protected].....
    Subject: 'Project for: ' Kim...'not updated in the last 30 days'
    185083
    190121
    190132
    190133
    190159
    190237
    284109
    286647
    294631
    322922
    [email protected]....
    Subject: 'Project for: Joe...'not updated in the last 30 days'
    183332
    183336
    [email protected]......
    Subject: 'Project for: Sam...'not updated in the last 30 days'
    183876
    183877
    183879
    183880
    183881
    183882
    183883
    183884
    183886
    183887
    183888
    This table is to shwo you the select statement output. I want to eliminnate the two days that that are less than 30 days since the last update in the last column.
    Assigneduser....Email.........Folderrsn...........indate.............maxattemptdate...days past since last update
    JIM.........      jim@ aol.com.... 284087.............     9/28/2006.......10/5/2006...........690
    JIM.........      jim@ aol.com.... 292709.............     3/20/2007.......3/28/2007............516
    KIM.........      kim@ aol.com.... 185083.............     8/31/2004.......2/9/2006.............     928
    KIM...........kim@ aol.com.... 190121.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190132.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190133.............     2/9/2006.........2/9/2006.............928
    KIM...........kim@ aol.com.... 190159.............     2/13/2006.......2/14/2006............923
    KIM...........kim@ aol.com.... 190237.............     2/23/2006.......2/23/2006............914
    KIM...........kim@ aol.com.... 284109.............     9/28/2006.......9/28/2006............697
    KIM...........kim@ aol.com.... 286647.............     11/7/2006.......12/5/2006............629
    KIM...........kim@ aol.com.... 294631.............     4/2/2007.........3/4/2008.............174
    KIM...........kim@ aol.com.... 322922.............     7/29/2008.......7/29/2008............27
    JOE...........joe@ aol.com.... 183332.............     1/28/2004.......4/23/2004............1585
    JOE...........joe@ aol.com.... 183336.............     1/28/2004.......3/9/2004.............1630
    SAM...........sam@ aol.com....183876.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183877.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183879.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183880.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183881.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183882.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183883.............3/5/2004.........3/8/2004.............1631
    SAM...........sam@ aol.com....183884.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183886.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183887.............3/5/2004.........3/8/2004............     1631
    SAM...........sam@ aol.com....183888.............3/5/2004.........3/8/2004............     1631
    PAT...........pat@ aol.com.....291630.............2/23/2007.......7/8/2008............     48
    PAT...........pat@ aol.com.....313990.............2/27/2008.......7/28/2008............28
    NED...........ned@ aol.com.....190681.............4/4/2006........8/10/2006............746
    NED...........ned@ aol.com......95467.............6/14/2006.......11/6/2006............658
    NED...........ned@ aol.com......286688.............11/8/2006.......10/3/2007............327
    NED...........ned@ aol.com.....291631.............2/23/2007.......8/21/2008............4
    NED...........ned@ aol.com.....292111.............3/7/2007.........2/26/2008............181
    NED...........ned@ aol.com.....292410.............3/15/2007.......7/22/2008............34
    NED...........ned@ aol.com.....299410.............6/27/2007.......2/27/2008............180
    NED...........ned@ aol.com.....303790.............9/19/2007.......9/19/2007............341
    NED...........ned@ aol.com.....304268.............9/24/2007.......3/3/2008............     175
    NED...........ned@ aol.com.....308228.............12/6/2007.......12/6/2007............263
    NED...........ned@ aol.com.....316689.............3/19/2008.......3/19/2008............159
    NED...........ned@ aol.com.....316789.............3/20/2008.......3/20/2008............158
    NED...........ned@ aol.com.....317528.............3/25/2008.......3/25/2008............153
    NED...........ned@ aol.com.....321476.............6/4/2008.........6/17/2008............69
    NED...........ned@ aol.com.....322160.............7/3/2008.........8/21/2008............4
    MOE...........moe@ aol.com.....184169.............4/5/2004.......12/5/2006............629
    [email protected]/27/2004.......3/8/2004............1631
    How do I incorporate a if else statement in the above cursor so the two days less than 30 days since last update are not returned. I do not want to send email if the project have been updated within the last 30 days.
    Edited by: user4653174 on Aug 25, 2008 2:40 PM

    analytical functions: http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/functions2a.htm#81409
    CASE
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/02_funds.htm#36899
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/04_struc.htm#5997
    Incorporating either of these into your query should assist you in returning the desired results.

Maybe you are looking for

  • Can I manage multiple iPads with the same Apple ID?

    I have a client that will have 4 iPads at a trade show to use as displays for a small animation about their product. We will need to install a kiosk app from the app store on all iPads. I'm confused about how Apple IDs fit into all of this. Will I be

  • Fetching internal table values in a Form

    Hi, In a function module, in table interface i have declared a table. In source code this table gets values. In source code one perform statement is there. In that form, this table is not present. How can i get this table values in that form? Ezhil.

  • FCP 7 -  Share task w/ some bugs

    Share... is really a good feature in the new FCP 7 but, I think, it has some bugs First, in the "Share status window" never starts a progress bar. It always looks like as it were preparing but is transcoding. you should open "Batch Montitor" app to s

  • Logs in ASYNC mode

    Hello everyone, I have a question about logging in PL/SQL. Let's suppose I have something like this: CREATE OR REPLACE PACKAGE BODY pck_utilities AS     PROCEDURE LOG_MESSAGE(message VARCHAR2) AS         PRAGMA AUTONOMOUS_TRANSACTION;     BEGIN      

  • Linking to PDFs but not generating them

    I'm using RoboHelp HTML on RH8, formerly using RH6. In RH6, I think there was somewhere to indicate that links to PDF files that exist in the same folder as a topic could be excluded from the compile. That allowed me to maintain one copy of the PDF t