View stack creation policy

I have a view stack named myViewStack. Now within the view
stack i have components when i switch between the view stack views
I want each component's creation complete to be executed. The
myViewStack creationPolicy is set to all once a user logs into the
program. Any ideas on how I would do this.
Thanks....

The problem is in one view stack page i have a drop down list
that you can select different companies then in the other viewstack
page it has a display of charts. So lets say the drop down country
list is in selectedIndex=1 the charting is in selectedIndex=2 when
i select different companies from the dropdown component in
selectedindex=1 it will change the data in selectedindex=2

Similar Messages

  • View stack issue creation

    Lets say you have the following view stack with the following
    components in it. When i turn on creationPolicy="all"
    Any of the components will not call their
    creationComplete="loadData()" any ideas as to why?

    The problem is in one view stack page i have a drop down list
    that you can select different companies then in the other viewstack
    page it has a display of charts. So lets say the drop down country
    list is in selectedIndex=1 the charting is in selectedIndex=2 when
    i select different companies from the dropdown component in
    selectedindex=1 it will change the data in selectedindex=2

  • Why do I need to declare "defaultButton" ? (In a component form part of view stack)

    After doing some research and some help from FlexGuy in another thread, I realize that I need to make sure I have custom components initialized before accessing parts of the component.  Just recently I was thrown for a long time when I tried to first click on a form field that was part of a component in my view stack, I'd get:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at mx.managers::FocusManager/focusInHandler()[C:\autobuild\galaga\frameworks\projects\framew ork\src\mx\managers\FocusManager.as:601]
    With the debugger it's occuring in the focusInHandler method of FocusManager.as: (apparently _defaultButton is null.)
    // restore the default button to be the original one
                    if (defButton && defButton != _defaultButton)
                        defButton.emphasized = false;
                        defButton = _defaultButton;
                       _defaultButton.emphasized = true;
    This prompted me, on a whim, to delcare a defaultButton:
    <mx:Form id="empForm" defaultButton="{submitButton}">
    which refers to my submit button:
    <mx:Button id="submitButton" click="submitEmployee()" label="{submitLabel}"/>
    My question, is why is this necessary? In some examples I don't see this declared at all, but I seem to need it? (I'm calling creationPolicy="all" to make sure my components are initialized but I still seem to have to this defaultButton declared?)

    It's a way of proving that you are able to purchase content from that country's store i.e. that you have a valid billing address in it
    From Why can’t I select None when I edit my Apple ID payment information? - Apple Support :
    If you changed your country or region
    When you change the country or region of an existing Apple ID, you must provide a payment method and update your billing options. If you want to remove your payment method after you change the country or region, you can change your payment information to None.

  • Setting selectedIndex on view stack after removal

    I'm having an issue where when I remove an element from a ViewStack its not selecting the previous item in the list. It keeps snapping back to index 0.
    here's some simple code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication
              xmlns:fx="http://ns.adobe.com/mxml/2009"
              xmlns:s="library://ns.adobe.com/flex/spark"
              xmlns:mx="library://ns.adobe.com/flex/mx"
              creationComplete="onCreationComplete();"
    >
              <fx:Script>
                        <![CDATA[
                                  import spark.components.Label;
                                  import spark.components.NavigatorContent;
                                  private function onCreationComplete():void {
                                            for (var i:int = 0; i < 10; i++) {
                                                      addNew();
                                  private function removeCurrent():void {
                                            var child:NavigatorContent = layouts.selectedChild as NavigatorContent;
                                            if (child) {
                                                      layouts.removeChild(child);
                                  private function addNew():void {
                                            var title:String = "item " + layouts.length;
                                            var content:NavigatorContent = new NavigatorContent();
                                            content.label = title;
                                            var label:Label = new Label();
                                            label.text = title;
                                            content.addElement(label);
                                            layouts.addElement(content);
                        ]]>
              </fx:Script>
              <s:layout>
            <s:VerticalLayout/>
        </s:layout>
        <!-- Drop down list to show the view stack, uses double data binding -->
              <s:DropDownList id="dropDown" width="200" labelField="label" dataProvider="{layouts}" selectedIndex="@{layouts.selectedIndex}" />
              <!-- TabBar to show the view stack, uses single data binding -->
              <s:TabBar id="tabBar" width="100%" dataProvider="{layouts}" />
              <!-- Content view stack -->
              <mx:ViewStack id="layouts">
              </mx:ViewStack>
              <!-- Buttons to test -->
              <s:Button label="remove" click="removeCurrent();"/>
              <s:Button label="add" click="addNew();" />
    </s:WindowedApplication>
    when you remove the current item, the stack selects item 0. I cannot seem to override this. I want the view stack to select the previous item in the list

    Using SuperTabBar from the flexlib solves this issue. http://flexlib.googlecode.com/svn/trunk/examples/SuperTabNavigator_Sample.swf
    when you delete a tab, the bar selects the next one in line. Am I wrong in expecting this functionality out of the box in the spark componenet library?

  • Hbox in view stack does not update width

    Hi there,   I'm working on flash builder and I have four hboxes nested inside a view stack. I dynamically populate each hbox with images grabbed from the database. For some reason only the visible hbox correctly updates its' width while the other 3 hbox takes on the width of this one so I end up with all four hbox having the same width. This is a problem when I have lots of images in one than the other and some of them gets cut off.
    The hboxes do not have scroll bars as the viewstack has a mouse easing scroller function attached to it - the hbox scrolls according to the position of the mouse.
    Am I doing something wrong here?
    <mx:Canvas height="110"
                       width="663"
                       visible.loginState = "false"
                       x="10"
                       y="577" horizontalScrollPolicy="off" verticalScrollPolicy="off" id="viewStackContainer">
                <mx:ViewStack id="myViewStack" creationPolicy="all"
                              borderStyle="none">
                    <!-- Books Library -->
                    <mx:HBox horizontalAlign="left" verticalScrollPolicy="off" horizontalScrollPolicy="off" verticalAlign="middle" horizontalGap="0" id="books" />
                    <!-- EBooks Library -->
                    <mx:HBox horizontalAlign="left" verticalScrollPolicy="off" horizontalScrollPolicy="off" verticalAlign="middle" horizontalGap="0" id="ebooks" />
                    <!-- Recordings Library -->
                    <mx:HBox horizontalAlign="left" verticalScrollPolicy="off" horizontalScrollPolicy="off" verticalAlign="middle" horizontalGap="0" id="recordings" />
                    <!-- Readings Library -->
                    <mx:HBox horizontalAlign="left" verticalScrollPolicy="off" horizontalScrollPolicy="off" verticalAlign="middle" horizontalGap="0" id="readings" />
                </mx:ViewStack>
            </mx:Canvas>

    Hi thanks for your reply. As the hbox gets populated i need it to resize itself. Once each hbox has been populated with the images I attach a function to the viewstack which allows me to scroll the hbox with mouse position - so it scrolls horizontally depending on where the mouse is in relation to the viewstack. So as you can see I need by this point for each hbox to have resized in order to correctly calculate my scrolling function.  The bizarre thing is the selected Index hbox displays all the images but the rest of the hboxes takes on the same width as this one and this is a problem because some of my other hbox contains more images.  As a test I set the selected Index of the viewStack to be the third Hbox, then I restarted the application and now all the hbox takes on the wdith of this one.   I am creating a library of thumbnails which is dynamically driven. It's not possible for me to predetermine the width of each. Do you have any suggestions for this?

  • Show a custom component on button click in a view stack`

    Hello folks
    I have a view stack in which i have some custom components.
    Now there is one custom component in which there is one button. On the button click, i want to show another custom component but i dont know how to do it. Should i write the inline mxml click event in custom component?? If yes then how??
    Currently i am doing it as
    click="{customcomponent}"

    As you know, ViewStack  has containers, lilke VBox for its views.
    Assuming one of your views VBox has an id of myVBox, and that VBox has the Button that when clicked will display the component, just have the component in the view already, but you can make it invisible with visible=false and includeInLayout=false, and then upon button click set those two variables to true.
    You will probably want a show handler for the view VBox to make those properties false each time that view is displayed.
    Here is some simple sample code.
    If this post answers your question or helps, please mark it as such.
    ---------- MySimpleComponent.mxml ----------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
      width="100%" height="100%" horizontalAlign="center">
      <mx:Label text="My Custom Component"/>
    </mx:VBox>
    ---------- MainApp.mxml  ----------
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      xmlns:comp="*" horizontalAlign="center" verticalAlign="middle">
      <mx:Script>
        <![CDATA[
        ]]>
      </mx:Script>
      <mx:LinkBar dataProvider="{vs}"/>
      <mx:ViewStack id="vs" width="100%" height="100%">
        <mx:VBox label="view1" width="100%" height="100%"
          horizontalAlign="center">
          <mx:Label text="View One"/>
        </mx:VBox>
        <mx:VBox label="view2"  width="100%" height="100%"
          show="myComp.visible=false;myComp.includeInLayout=true;"
          horizontalAlign="center">
          <mx:Label text="View Two"/>
          <mx:Button label="Make myComp Visible" click="myComp.visible=true;myComp.includeInLayout=true;"/>
          <comp:MySimpleComponent id="myComp" visible="false" includeInLayout="false"/>
        </mx:VBox>
      </mx:ViewStack>
    </mx:Application>

  • View stack call

    Lets say i have a component with the name "Accounts" in this
    component it has a view stack named "stkView". How do i reference
    the "stkView" in the main application?

    Usually you just chain the ids to the ViewStack.
    So if the component instance is created in AS:
    private var acct:Accounts = new Accounts();
    private function init():void{
    acct.stkView.selectedChild = "cont2";
    }

  • Flex 4 custom component with children inserted directly into view stack

    I give up. Hopefully I am just missing something easy, but I feel like I am pulling teeth trying to get this to work. All I want is a custom 'wizard' component whose children are placed within a ViewStack and beneath the ViewStack there is a next and back button. Here are some code excerpts to illustrate my approach:
    WizardGroup.as:
    [SkinPart(required="true")]
    public var nextBt:Button = new Button();
    [SkinPart(required="true")]
    public var backBt:Button = new Button();
    [SkinPart(required="true")]
    public var stack:ViewStackSpark = new ViewStackSpark();
    WizardGroupSkin.mxml:
    <s:VGroup width="100%" height="100%"
              paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10">
         <container:ViewStackSpark id="stack" width="100%" height="100%">
              <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0"/>
         </container:ViewStackSpark>
         <s:HGroup horizontalAlign="right" width="100%">
              <s:Button id="nextBt" label="Next" enabled="{hostComponent.permitNext}" enabled.last="false"/>
              <s:Button id="backBt" label="Back" enabled="{hostComponent.permitBack}" enabled.first="false"/>
         </s:HGroup>
    </s:VGroup>
    While this comes very close to working, the major problem is that the children of the WizardGroup component are not added as children of the viewstack. Instead, they are added as children of the contentGroup. So the viewstack will always only have one child: contentGroup.
    I also tried the approach of binding the contents of the view stack to the children of contentGroup, but with Spark containers, there is no way to access an array of children or array of elements (ie, there is no contentGroup.getChildren() or contentGroup.getElements()).  Finally, I tried making the id of the ViewStackSpark "contentGroup" but since the ViewStackSpark inherits from BorderContainer, Flex complains at runtime that it can't cast the BorderContainer to Group.
    Help would be greatly appreciated.
    Thanks everyone.
    Josh

    I finally figured it out. The trick is to set the default property of the WizardGroup to a public member array I am calling "content"
    [DefaultProperty("content")]
    public class WizardGroup extends TitleWindow
        [SkinPart(required="true")]
        public var nextBt:Button = new Button();
        [SkinPart(required="true")]
        public var backBt:Button = new Button();
        [Bindable]
        public var content:Array;
    And then within the skin, bind the content of the viewstack to the hostComponent's content array:
            <s:VGroup width="100%" height="100%"
                      paddingBottom="10" paddingTop="10" paddingLeft="10" paddingRight="10">
                <container:ViewStackSpark id="stack" width="100%" height="100%" content="{hostComponent.content}"/>
                <s:HGroup horizontalAlign="right" width="100%">
                    <s:Button id="nextBt" label="Next" enabled="{hostComponent.permitNext}" enabled.last="false"/>
                    <s:Button id="backBt" label="Back" enabled="{hostComponent.permitBack}" enabled.first="false"/>
                </s:HGroup>
            </s:VGroup>

  • View Stacks or States?

    So I have this interface where someone logs into a system and
    they go to a dashboard. That's part is cool. But then I have the
    option of then using a view stack to allow people to navigate the
    different menu options/tabs or I could use states to accomplish the
    same thing. It isn't entirely clear to me which way I should go
    when I'm building out the interface.
    When should I choose one over the other?

    Gregory Pierce wrote:
    > So I have this interface where someone logs into a
    system and they go to a
    > dashboard. That's part is cool. But then I have the
    option of then using a view
    > stack to allow people to navigate the different menu
    options/tabs or I could
    > use states to accomplish the same thing. It isn't
    entirely clear to me which
    > way I should go when I'm building out the interface.
    >
    > When should I choose one over the other?
    >
    In my limited experience I base it on the amount of change
    between one
    view to another. In my first live application I have a two
    element view
    stack and two view states. The view states are used to
    add/remove a
    single control from the user interface. The view stack is
    used to
    completely change every element of the view from one 'page'
    to the next.
    For a small application with only four main UI views it works
    nicely.
    Let me know if you would like more details.
    <mx:states>
    <mx:State name="comment">
    <mx:AddChild position="lastChild">
    <Ctrl:comment
    id="commentDialog"
    saveCommentEvent="saveCommentEventHandler(event)"
    cancelDialogEvent="cancelCommentEventHanderl(event)"
    commentType="{commentType}"
    horizontalCenter="0" top="50"/>
    </mx:AddChild>
    </mx:State>
    <mx:State name="login">
    <mx:AddChild position="lastChild">
    <mx:Container
    top="0" left="0"
    width="100%" height="100%"
    backgroundColor="#000022"
    backgroundAlpha=".85"/>
    </mx:AddChild>
    <mx:AddChild position="lastChild">
    <Ctrl:loginForm
    id="loginForm"
    horizontalCenter="0"
    top="100"
    loginSubmitEvent="loginCheck(event)"/>
    </mx:AddChild>
    </mx:State>
    </mx:states>
    <mx:ViewStack id="troubleLog"
    width="100%" height="100%"
    minWidth="0" minHeight="0">
    <views:masterList x="0" y="0" id="master"
    gridSource="{troubleLogAry}"
    loadTroubleEvent="readTroubleEvent(event)"
    newTroubleEvent="initTroubleEvent()"
    selectTroubleLogView="viewDetails(1)"
    filterUpdateEvent="updateFilterHandler(event)"/>
    <views:logDetails x="0" y="0" id="details"
    colorsAry="{colorsAry}"
    troubleLogEntry="{troubleLogEntry}"
    assigneesAry="{assigneesAry}"
    applicationsAry="{applicationsAry}"
    saveTroubleEvent="saveTroubleEvent(event)"
    selectTroubleLogView="viewDetails(0)"
    showCommentDialogEvent="displayCommentHandler(event)"/>
    </mx:ViewStack>

  • Dynamic View Object Creation and Scope Question

    I'm trying to come up with a way to load up an SQL statement into a view object, execute it, process the results, then keep looping, populating the view object with a new statement, etc. I also need to handle any bad SQL statement and just keep going. I'm running into a problem that is split between the way java scopes objects and the available methods of a view object. Here's some psuedo code:
    while (more queries)
    ViewObject myView = am.createViewObjectFromQueryStmt("myView",query); //fails if previous query was bad
    myView.executeQuery();
    Row myRow = myView.first();
    int rc = myView.getRowCount();
    int x = 1;
    myView.first();
    outStr = "";
    int cc = 0;
    while (x <= rc) //get query output
    Object[] result = myRow.getAttributeValues();
    while (cc < result.length)
    outStr = outStr+result[cc].toString();
    cc = cc+1;
    x = x+1;
    myView.remove();
    catch (Exception sql)
    sql.printStackTrace(); myView.remove(); //won't compile, out of scope
    finally
    myView.remove(); //won't compile, out of scope
    //do something with query output
    Basically, if the queries are all perfect, everything works fine, but if a query fails, I can't execute a myView.remove in an exception handler. Nor can I clean it up in a finally block. The only other way I can think of to handle this would be to re-use the same view object and just change the SQL being passed to it, but there's no methods to set the SQL directly on the view object, only at creation time as a method call from the application module.
    Can anyone offer any suggestions as to how to deal with this?

    I figured this out. You can pass a null name to the createViewObjectFromQueryStmt method, which apparently creates a unqiue name for you. I got around my variable scoping issue by re-thinking my loop logic.

  • Previews not loading in grid view (stacks) 10.6.3

    Hi, I am having a rather odd bug with stacks: everything works just dandy (previews load) unless I look at a certain folder. If I navigate to the folder (in stack view) it will load maybe 80% of the item previews and then just stop (it loads different ones each time). After I have done this, no preview for anything will load other than folder icons (in stacks, that is), unless I log-out log-in or restart. I have tested this many times, and it is consistent. Cover flow still works, even after stack previews have stopped appearing. An annoyance really, but I still would like to fix it if possible, so thanks in advance for any ideas.

    That's the point to where I was getting - without icon previews, the default icon for .m4v files should be the following:
    (This was just taken from my wife's MacBook Pro, still on iTunes 10.6.2 but running Snow Leopard 10.6.8)
    Under Lion (10.7.4) and iTunes 10.6.3, the default icon (no previews) is empty white, which I do not believe should be - I had the above generic icon for .m4v files in Lion under 10.6.2.
    Yet iTunes-associated audio files are fine: (from my iMac)
    Strange, isn't it??
    Steve

  • Materialized View Initial Creation vs Complete Refresh - MAJOR differences

    Hi All,
    I am currently in the process of setting up MV's for replication via a DBLink and have noticed something that I find quite odd. Basically If I create an MV I get v. large differences than when I do a complete refresh on the same MV after the initial "load". Actual stats are shown below :
    Action TimeTaken Undo Reqd (Bytes)
    Initial Load 00:01:07     37254998
    Complete Refresh     00:02:41     463919012
    Question is why does a complete refresh require 12x the amount of Undo than the creation of the MV? I though tit would be roughly the same or at most twice as much?
    The Instance is only being used by myself so no other processes are causing this difference and this can be reproduced. Undo calculated from V$ROLLSTAT.
    Thanks
    MH

    Hi tekicora,
    Thanks for your help and suggestions. I have tried this method of evaluating UNDO with the following results:
    STATISTIC# NAME SID VALUE
    176 undo change vector size 115 132
    CREATE MATERIALIZED VIEW mytest1
    TABLESPACE TABSPACEA NOLOGGING BUILD IMMEDIATE
    USING INDEX TABLESPACE TABSPACEB REFRESH FORCE WITH ROWID ON DEMAND AS
    select * from ptable@remdb;
    STATISTIC# NAME SID VALUE
    176 undo change vector size 115 332860
    exec DBMS_MVIEW.REFRESH('MYTEST1', 'C',ATOMIC_REFRESH=>TRUE);
    STATISTIC# NAME SID VALUE
    176 undo change vector size 115 261460092
    exec DBMS_MVIEW.REFRESH('MYTEST1', 'C',ATOMIC_REFRESH=>FALSE);
    STATISTIC# NAME SID VALUE
    176 undo change vector size 115 272282756
    This is still creating masses of undo (particulalry atomic refresh). Could this be because mv table source is on a remote db?
    Thanks
    Mark H
    Message was edited by:
    markyb0y

  • Can't find setting for IE10 Compatibility View in Group Policy Management Console.

    Hoping this is easy.
    I'm trying to use the Group Policy setting for Compatibility View under Computer Configuration/Administrative Templates/Windows Components/Internet Explorer and it is not there.
    The domain controllers are 2008 Standard SP2, so not R2. We are using ADMX files from a central store.
    If I open the local GPEdit on my Windows 7 workstation I can see the setting for Compatibility View but cannot see it using RSAT or on the domain controllers themselves.
    How do I get this setting to appear so I can use it?
    Thank you.
    Kenny

    > If I open the local GPEdit on my Windows 7 workstation I can see the
    > setting for Compatibility View but cannot see it using RSAT or on the
    > domain controllers themselves.
    Copy %windir%\policydefinitions from your win7 WS to the central store:
    robocopy "%windir%\policydefinitions"
    "\\%userdnsdomain%\sysvol\%userdnsdomain%\policies\policydefinitions" /s
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Viewstate component creation policy .

    Hi ,
    I am creating a cover flow component , the one very similar to the example given in tour de flex. I see some start up delay . I thought of using states to show a screen with a spinner until the coverflow component got created . Hence  , I set the currentstate="normalstate" at the creationcomplete of coverflow component and showed another panel with a spinner in it have state as "loadState" which is the default state . But I see that , the creation complete event of coverflow is not called as the component is not currently visible . I tried giving itemcreationpolicy to "immediate" but it seems Flex is not creating components for all view states . It just creates components that are visible in the default load state ( which is the panel with spinner in my case ) . Is there any way to specify creation of all components for all view states ? ( I tried creationpolicy = all too , doesn't seem to work )

    Hi ,
    I created a sample of what I need if my question is not clear . is it possible for creationcomplete methods of both panels to be called during application startup ? currently , only the creationcomplete method of first panel gets called .
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationPolicy="all">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <s:states>
            <s:State name="loadState"/>
            <s:State name="afterLoadState"/>
        </s:states>
        <fx:Script>
            <![CDATA[
                private function first():void
                    trace(" first panel ");               
                private function second():void
                    trace(" second panel  ");
            ]]>
        </fx:Script>
        <s:Panel width="239" height="308" title="One" includeIn="loadState" x="62" y="37" creationComplete="first()" click="currentState='afterLoadState'"/>
        <s:Panel width="239" height="308" title="two" id="paneltwo" includeIn="afterLoadState" itemCreationPolicy="immediate" x="327" y="40" creationComplete="second()"/>
    </s:Application>

  • People view stacks have no photos assigned

    I had PE11 and have now upgraded to PE13. When I'm in the people view all of my people show no picture assigned to their stack of pictures. How do I assign a photo to them? Thanks! Brian

    Please post Photoshop Elements related queries over at
    http://forums.adobe.com/community/photoshop_elements

Maybe you are looking for

  • Change Document Library Folder Name from client (JavaScript (JSOM) or Rest)

    Hi According to : http://social.technet.microsoft.com/Forums/sharepoint/en-US/23441a0d-022a-4d97-8058-b75f32e342d2/rest-api-to-rename-the-folder-move-folder-copy-folder-prog-lang-is-java?forum=sharepointdevelopment Renaming a folder with Rest is not

  • No mapping program found - scenario soap to file

    Hi all, I'm developing a PI scenario Soap to file and I have a following problem. My source is a third party System and my target is a ECC 6.0. I have created two data type, only different in one value. When tried to check my scenario, I obtain this

  • Pdf table to  datatable in C#

    hi I need retrive the a table form pdf file to c# datatable or  table particular table as string where pdf contain images ,string  and table is there any way to get table thank for reply

  • Export Failed.  Failed to write CSV file.  HELP!

    We are new to Numbers and were able to export a csv file of our data earlier. Now we get this error when I try to export. I can find no explanation and export attempts fail. Any ideas? Ultimately, I am trying to export a file of contact e-mail addres

  • Disable AutoAnalyzer as default during setup.

    I was wondering if there is a way to have auto-analyzer disabled by default during the setup process, so that different user's won't have to disable it themselves?