Flex :: Programmatically Add Views To A Viewstack

Jun 10, 2010

I'm trying to figure out how to in as3 (not mxml) add views to a view stack.For example I have a view component like so[code]I've being trying to add it to a viewstack in the following way.[code]I'm aware I have to assign ID's but for now I just want to get the view in there

View 2 Replies


Similar Posts:


Flex :: Passing Parameters Between Views In ViewStack?

Mar 19, 2011

how I would pass a value to "SelectedChild" in ViewStack:

In the example below, I am trying to set a public property in a form called "register" after I have navigated there from another form called "login".

The result I get seems to be a compilation error:

Error: Access of possibly undefined property pagename through a reference
with static type mx.core:INavigatorContent.
vsMain.selectedChild.pagename = "register page";

[Code]....

View 2 Replies

Flex :: Passing Data From Modules To Parent Application To Switch Views In The Viewstack

Jan 11, 2010

I have application with a viewstack witch load 5 modules. each module is loaded via the moduleLoader tag and they all have an id.

Every loaded module has a context menu. the context menu has 5 menuItems. one menuItem for each view for the viewstack.

The context menu is loaded via xml.

this is my application file.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundColor="#b1b1b1"

[Code].....

the xml of the context menu is in the module but, the context menu is in a as file that extensiate a button.

View 1 Replies

Actionscript 3 :: Flex Viewstack "blink" When Switching Between Views?

Sep 12, 2011

I'm working on an app in which I want the viewstack to switch views on certain events. I have them switching correctly but there appears to be a slight "blink" when the change between views occurs. I've tried creationPolicy="all" but that doesn't fix the problem. The reason the "blink" is so noticeable is the fact that the views in the viewstack are different width/heights. Is there a way to stop this "blinking" effect on viewstack view switch?

[Code]...

View 2 Replies

Flex :: Passing Data Between Views In Adobe Flex (Actionscript)?

Mar 30, 2011

Ive read a ton of online tutorials about this and cant seem to get a definite answer...

View1.mxml
navigator.pushView(views.view2, {response:"BLAH"});
View2.mxml

[code].....

View 2 Replies

Handle Application Views In Flex?

Jul 1, 2010

I have a Flex application with three different views. Only one view is shown at a time, and the choice of view depends on what part of the application the user is working with. If it had been an ordinary HTML webapp I would have created three different HTML-templates/pages for each view.

What is the recommended way to handle such application views in Flex?

View 1 Replies

Flex :: Access All Views In ViewNavigatorApplication

Sep 13, 2011

I'd like to make an application for PlayBook (using Flex) that has the UI similar to the PlayBook web browser. By similar I mean I want to implement a menu that is shown when the user swipes down from the top bezel of the tablet. I like this feature because I can draw on it, place tons of other objects and handle all kind of events without using screen space when not needed. Plus the PlayBook does not have a "Menu" button like some phones have.Depending on configurations chosen from the first view a number of other views will be pushed onto the the stack view. When the user will access the pull down menu I'd like to show in form of thumbnail snapshot my main (configuration view) and the rest of the views that are on the view stack. This will basically show the user what is going on in different view and let him choose to which one to switch.[code]The menu is accessible from any view, but the code for event handler is in my main MXML file (project.MXML), I found this to be the only way of having one menu for all the views. I managed to pull down the menu from any view and displaying a thumbnail of the current view.

How to get access to all the views. I've been trying all day and all my trials give me access to the active view and my menu object. Here is some code to show what is going on:[code]As I mentioned above this for loop will successfully do the job for the current view then it will crash.Does anyone know how to loop through all the views? This is my first application with flex so if there are any alternatives to my approach I'll be glad to try them. Although I'd like to stick with a single ViewNavigator as opposed to tabbed navigator and multiple views instead of states.

View 1 Replies

Flex :: Example Flex Zend AMF Sharing Web Services Between Components In ViewStack

Aug 10, 2011

I've been searching for the last couple days but can't seem to find a basic example of what I'm looking for. I'm developing a Flex 4.5 app and in it I have a viewstack of 2 components that use some of the same services. Currently the only way I can get the app to correctly use the web services is by defining 2 different web services that use the same PHP web service file. For example: I have an app, and within it I have a viewstack with tab navigation of 2 components: #1) retrieve a list of all Salary Employees, and #2) retrieve a list of all Contractors. Currently to get it working I am defining a UsersTableEmployees webservice within component #1 and a UsersTableContractors webservice within component #2, but they both point to the same PHP class, and only differ in the arugment value I pass to them. Ie, getUsers("employee") and getUsers ("contractors"). Of course this is not best practice.

Searching StackOverflow and Google gives me many results about ColdFusion and MVC (example What's the best way to share data between components in Flex?), but I'm still confused. Can anyone here point me to a basic example (even sample MVC) and source code of an app that uses Zend AMF and allows different components to call common web services?

View 1 Replies

Flex :: Handling Multiple Views Of The Same ArrayCollection

Feb 22, 2010

I have an ArrayCollection bound to a view, I use a filterFunction on this view to only display parts of the contents. Additionally I have another component where I want to display other parts of the ArrayCollection.

What I would like to do is wrap ArrayCollections around each other, meaning I could have one ArrayCollection containing the model data, and then two separate outer ones where I can set the filterFunction property (setting this in the model seems inappropriate in all cases). Is this possible somehow? If not, how else can this be solved, preferably without forcing model logic to end up in my view?

View 2 Replies

Flex :: Multiple Instances Of Views In PureMVC

Sep 15, 2010

Often multiple instances of the view component would be used in multiple places in an application. Each time I do this, I register the same mediator with a different name. When a notification is dispatched, I attach the name of the mediator to the body of the notification, like so:

[Code]...

View 1 Replies

Flex :: Passing Data Into Tabbed Views?

Apr 18, 2011

I have a project that has 4 views where I'm using the tabBar with viewStack/NavigatorContent. I have a couple HTTPServices set up gathering the XML and converting to Bindable ArrayCollections. When and how is the best way to pass that data to such things as charts, dataGrids, etc. that aren't seen until the user clicks a tab? Right now I have each item set up with creationComplete functions that pass it then. Although it seems to be working, is this the best way, or is there something better and maybe even quicker?

View 2 Replies

Actionscript :: Flex 4.5 - Global Variable Across All Views?

Nov 20, 2011

How do you define a global variable that is accessible across all views on Flex mobile / Flex 4.5/4.6

(Edited for clarification)

Is it still necessary to have to use a separate global class?

(additional) There is a new PersistanceManager in Flex 4.5, is there something like a GlobalObjectsManager that can be used to just set/get stuff in memory?

View 2 Replies

Flex :: Modularity - Decompose An Application In Views?

Nov 21, 2011

What are the criteria for decomposing a Flex applicaiton to views? I find quite difficult to apply the Single Responsibility Principle in this context.I've come to the following conclusions through my experience:More monolithic approach(e.g. one view per tab, lots of panels in the same tab)Very easy communication between components as only one Presentation Model is used Cannot use multiple States, only on the top level component.More modular approach (e.g. one view per panel)(the opposite to the monolithic one)

View 1 Replies

Flex :: Always Resize The ViewStack?

Mar 23, 2010

I'm using a viewStack which have is property resizeToContent set to true. When I'm selecting a child higher than the viewStack, it's correctly resized, but when I'm selecting another child which is smaller, the viewStack isn't resized! What I want is that my viewStack get the height of the selectedChild each time.

though, the Adobe doc say :

If true, the ViewStack container automatically resizes to the size of its current child.

View 1 Replies

Flex :: Possible To Use DeepLinking Without A ViewStack?

Nov 2, 2010

I've got a Flex 3 project.Does deep linking only work on viewStacks? (My project doesn't have any viewStacks). I'd like to use deeplinking based on what was selected in a comboBox. I'd like the user to be able to bookmark or use the back button based on what was selected in the comboBox.The comboBox selection determines which data is pulled from the database.Is this possible? I set-up deeplinking in another project, but it had viewStacks. And all of the deep linking examples that I've seen use viewStacks.

View 1 Replies

AS3 :: Flex - Inherited Classes And Dynamic Views In PureMVC

Jul 14, 2009

I was wondering best practices for views of inherited classes in PureMVC in this situation: Multiple classes inherit a BaseClass (lets say InheritedClass1 and InheritedClass2) Each InheritedClass has a respective view (derived from a base view class, but each unique) With a given dataset (lets say ArrayCollection of InheritedClass1/2 Objects), the respective views need to be dynamically loaded. The dataset is relatively large, so a TileList would be nice (since it only instantiates objects which are currently displayed) I can think of a couple solutions, but I find them to be too "hackish" to be the best solution:

In View: Repeater over a BaseClassView which attributes a view to a State (set to the "InheritedClass1" state to add a InheritedClass1 object) Pros: No unneeded memory increase (States' objects are instantiated when needed) Cons: View is dependent on the data types, so adds coupling In Mediator: Loop over the ArrayCollection and addChild() the views based on data type Pros: Works. Cons: Mediator is adding things to the View, which defeats the point of the separation of Mediator and View. Slower than a Repeater.

View 4 Replies

Flex :: Single Model - Multiple Filtered Views

May 17, 2010

I have data model (dataProvider as ArrayCollection) i want to display in few views , each view should show filtered data. As you probably know, filterFunction is property of ArrayCollection,so I can't use this solution (unless creating new instance of ArrayCollection for each view on top original and impementing filterFunction).

View 2 Replies

Flash :: Flex - Builder - 4 - Using MXML As Views - Any References?

Dec 14, 2010

I'm looking to create a flashBuilder document which uses seperate MXML files as "views" which are controlled by states - I believe it's a design pattern of sorts but I'm relatively new to FlashBuilder. I was wondering if anyone knew what design pattern it was and if I can be pointed in the direction of some good references! FYI I'm looking into using FlashBuilder to design Android apps

View 1 Replies

Flex :: Data - Pass Multiple Strings Between Views?

Aug 10, 2011

I have a list of txt files and when one is selected it is read and assigned to a string variable. this string is then pushed to a view : pushView(viewer, string), where the string is displayed in a textarea. I want to also pass the relative path of the file also. Is this possible to pass two strings?

[Code]...

View 1 Replies

Flex :: Set Selected Child In Viewstack?

Dec 3, 2009

in main.mxml :

public function init():void
{
PopUpManager.createPopUp(this,login,true);
}

[Code]....

How can i selectchild of main.mxml's Viewstack from login.mxml ?

View 4 Replies

Flex :: ViewStack Not Showing Change At First

Jan 24, 2010

I have as good as finished a new project I'm working on now for a while, and I have this small problem coming up at the fine tuning.The area of concern is so I believe the ViewStack I'm using, but I'm not sure so here the details.I have several check boxes (4), and only one at all times can be selected to show off associated Radio Buttons as a Group of (6). No RBtn pre selected.With the selection of a check box I also make visible a new Radio Button Group of (4). No RBtn pre selected here either.Now if I select one of the RBtn (6 - each has a different Paper size measurement showing) then I can view through a external Xml data file details as Size, basePrice and the totalPrice which is in this case the same as the basePrice!

This totalPrice is located on the first Canvas/Label in the VStack!Selecting any of the first three (3) of the second RBtn Group (4) No RBtn pre selected either! - it will show me a Paper type description, and by selecting the fourth RBtn it will show me as well a field with the extra costs for a Canvas type, and it should select the second Canvas of the VStack with the totalPrice which is basePrice plus the extrasCost Canvas Price.Now the problem is that my second VStack Canvas/Label = totalPrice (basePrice +extraCost) is not showing up immediately! (It just shows blank canceling the basePrice out), and only if I select another of the six (6) RBtn! then it is showing the second vStack with the totalPrice (basePrice +extraCost). From here on everything works perfectly!I think that I have to mention that my RBtn Group are working in a function If / Else / If /Else configuration where both the Labels on both VStack Canvases are called up at the same time. So therefore both Labels should have data available which than should be viewed when the VStack changes?

View 1 Replies

Flex :: Use A Viewstack With A Tree List?

Jan 31, 2011

I want to know if I can use a tree and when and item in the tree is clicked the viewstack changes to that certain item?

View 1 Replies

Flex :: GetChildren() Not Working For ViewStack?

Mar 15, 2011

My Strucutre is like this.

<mx:ViewStack>
<mx:HBox>
<mx:Form>

[code]......

View 2 Replies

Flex :: Access Other Panels In ViewStack?

Mar 28, 2011

I have a ViewStack with 2 panels:

<mx:ViewStack id="viewstack1" height="243">
<mx:Panel id="gridPanel">
<mx:DataGrid id="grid" right="10" left="10" top="10" bottom="10" width="300" height="150" itemClick="showDetails(event)">

[Code]....

I want to have the user click a grid item in the first panel and then load the data in a panel in the second panel. I can grab the value of the index for the clicked item in the itemClicked handler, but how do I access the detailsPanel to set the values based on the row info from the Grid?

View 3 Replies

Flex :: 4 - Add A Component Into A Viewstack Dynamically

Aug 2, 2011

I want to add a component into a Viewstack dynamically in flex4. Like code below

[Code]....

But the code in comment doesn't play the effect. How can I implement it? Does the canvas have any hideffect or showeffect to Bind

View 2 Replies

Flex :: Dynamic Tabs Using ViewStack?

Sep 20, 2008

I'm having problems creating dynamic tabs here's my code:

mxml:

<s:TabBar x="1" y="1" height="32" width="100%" dataProvider="{tabHolder}" chromeColor="#EF8B01"/>
<mx:ViewStack x="2" y="34" id="tabHolder" width="100%" height="214" creationPolicy="all">
<s:NavigatorContent label="Home" width="100%" height="100%">
<mx:Image x="6" y="8" height="181" width="402"/>

[code]....

tab wasn't added, what is wrong?

View 1 Replies

Flex :: MXML Views - Passing Dependencies Into Constructor Of Classes

Oct 6, 2009

I'm used to building applications using pure AS3. I always pass dependencies into the constructor of classes I make, but this method seems to not work out well for Flex MXML views. It seems like I should define setters on the MXML class, which map to attributes in the tag/class instantiation. But using this method I cannot specify which properties are required and in what order I expect them etc. What is the preferred method to give a Flex view it's dependencies?

View 3 Replies

Flex :: Flash Builder Data Passing Between Split Views

Feb 22, 2012

I have a SplitViewNavigator with two split views. In one of the views I have a list and in another one I have questions. User must solve the question and when user click send button, he will see another question.

But when user click to send button in one view, how can i know this in the other view? I'm a newbie in Flash Builder and I'm searching for this for hours.

View 1 Replies

Flash :: What Is Difference Viewstack And States In Flex

Jul 21, 2009

In my flex project i used one option like Link button . If i like it will be open new page contain more information and components . Which container is suitable one ? Where is used viewstack and stages ?

View 2 Replies

Flex :: Difference Between ViewStack Container And Canvas?

Dec 9, 2009

What is the main difference Between ViewStack Container and Canvas?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved