Note that there are some explanatory texts on larger screens.

plurals
  1. POFlex viewstack children includeIn works funny
    primarykey
    data
    text
    <p>I have a viewstack with childrens which I want to show/hide depending on the state the application is</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;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" xmlns:eworx="com.eworx.*" xmlns:view="com.eworx.view.*" xmlns:components="com.eworx.view.components.*" skinClass="com.eworx.view.skins.MainAppSkin" xmlns:layouts="com.eworx.view.layouts.*" currentState="login" initialize="init(event)" creationComplete="complete(event)" width="100%" height="100%"&gt; &lt;fx:Style source="assets/css/screen.css" /&gt; &lt;fx:Script&gt; &lt;![CDATA[ import mx.controls.Alert; import mx.core.FlexGlobals; import mx.events.FlexEvent; import nl.demonsters.debugger.MonsterDebugger; private var debugger:MonsterDebugger; [Bindable] public var apiUrl:String; [Bindable] public var customerType:String; protected function init(event:FlexEvent):void { debugger = new MonsterDebugger(this); } protected function complete(event:FlexEvent):void { var activated:Boolean = FlexGlobals.topLevelApplication.parameters.activated; var passwordReset:Boolean = FlexGlobals.topLevelApplication.parameters.passwordReset; var message:String = FlexGlobals.topLevelApplication.parameters.message; apiUrl = FlexGlobals.topLevelApplication.parameters.apiUrl; if(activated) { Alert.show(message,"Notice"); } if(passwordReset) { Alert.show(message,"Notice"); } systemManager.addEventListener(MouseEvent.MOUSE_WHEEL,onMouseWheel,true); } private function onMouseWheel(e:MouseEvent):void { e.delta *= 5; } ]]&gt; &lt;/fx:Script&gt; &lt;fx:Declarations&gt; &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt; &lt;eworx:Seven7Context contextView="{this}" /&gt; &lt;s:Fade id="fadeIn" alphaFrom="0" alphaTo="1" duration="300" /&gt; &lt;s:Fade id="fadeOut" alphaFrom="1" alphaTo="0" duration="300" /&gt; &lt;s:Rotate3D id="r3d" angleYFrom="0" angleYTo="360" duration="300" /&gt; &lt;/fx:Declarations&gt; &lt;s:states&gt; &lt;s:State name="login" /&gt; &lt;s:State name="wholesale" /&gt; &lt;s:State name="retail" /&gt; &lt;/s:states&gt; &lt;view:LoginForm id="loginForm" includeIn="login" horizontalCenter="0" verticalCenter="0" /&gt; &lt;s:Group excludeFrom="login" width="960" horizontalCenter="0"&gt; &lt;s:BitmapImage width="100%" height="42" x="13" y="80" source="@Embed('assets/garnish/bar.png')" /&gt; &lt;mx:Image source="assets/garnish/logo.png" top="23" /&gt; &lt;s:HGroup verticalAlign="middle" x="198" y="47"&gt; &lt;s:TabBar skinClass="MainMenuTabBarSkin" dataProvider="{vs}" buttonMode="true"/&gt; &lt;mx:LinkButton id="logout" label="Logout" click="{currentState='login'}" /&gt; &lt;/s:HGroup&gt; &lt;s:HGroup top="0" right="0" gap="1" verticalAlign="top"&gt; &lt;components:OfferList /&gt; &lt;components:MarginBuildersTrack /&gt; &lt;components:CartTrack top="0" /&gt; &lt;/s:HGroup&gt; &lt;mx:ViewStack id="vs" top="120" horizontalCenter="0" width="960" height="100%" resizeToContent="true" &gt; &lt;view:HomePage showEffect="{fadeIn}" hideEffect="{fadeOut}" label="Home" /&gt; &lt;view:ShowroomPage showEffect="{fadeIn}" hideEffect="{fadeOut}" label="Showroom" /&gt; &lt;view:CataloguePage showEffect="{fadeIn}" hideEffect="{fadeOut}" label="Catalogue" /&gt; &lt;!--&lt;view:IncentivesPage showEffect="{fadeIn}" hideEffect="{fadeOut}" label="Incentives" /&gt;--&gt; &lt;view:RetailCustomerProfilePage includeIn="retail" showEffect="{fadeIn}" hideEffect="{fadeOut}" label="My Profile" /&gt; &lt;view:WholesaleCustomerProfilePage includeIn="wholesale" showEffect="{fadeIn}" hideEffect="{fadeOut}" label="My Profile" /&gt; &lt;view:ClientsPage excludeFrom="retail,login" showEffect="{fadeIn}" hideEffect="{fadeOut}" label="My Clients" /&gt; &lt;view:CartPage showEffect="{fadeIn}" hideEffect="{fadeOut}" label="My Cart" /&gt; &lt;view:OrdersPage showEffect="{fadeIn}" hideEffect="{fadeOut}" label="My Orders" /&gt; &lt;/mx:ViewStack&gt; &lt;/s:Group&gt; &lt;/s:Application&gt; </code></pre> <p>AS you can see I inlude the retail customer view in the retail state and the wholesale customer view in the wholesale state. The problem is that when I run my app they don't appear on neither state.</p> <p>Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload