| Author |
Navigate from one mxml to another mxml
|
shambhu kumar
Greenhorn
Joined: Aug 07, 2008
Posts: 18
|
|
How to navigate from one mxml to another mxml?
Like navigating from one jsp page to another jsp page.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
There are all sorts of ways to do this. If you are designing an application, and that application is more than a very simple one, you probably should follow some sort of architectural pattern, for example Cairngorm, Pure MVC, Swiz etc.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2231
|
|
cairngorm is the worst Framework , better start using mate
What I think you should look at is Mate, which uses Flex to it's full potential, and it isn't built around global variables. Instead it helps you write loosely coupled, testable, reusable and maintainable code .
|
Save India From Corruption - Anna Hazare.
|
 |
shambhu kumar
Greenhorn
Joined: Aug 07, 2008
Posts: 18
|
|
Hi Ravi, Do you have any sample code for navigation, I tried SWIZ but didn't get for navigation.
If you having code in mate, can youu please send me at "ss2k1in@gmail.com".
Thanks
|
 |
Tariq Ahmed
Author
Greenhorn
Joined: Feb 16, 2010
Posts: 7
|
|
Well going one JSP to another JSP page... or one PHP page to another PHP page - is the common HTML web application mindset which is premised on "pages". Server side pages more specifically...
To go one from one MXML "page" to another MXML doesn't quite translate in that context. A key thing to note is that Flex applications are pure client side. At a basic level Flex application, is one "binary" if you will (a Flash swf file)... so you could go from one Flex application, to another Flex application - not advised however.
So within your Flex application you'll have various visual components that you can control what show's and when either programmatically, or using something called states. In the book we have one chapter on application navigation, and another chapter on using view states. Flex comes with something called navigator containers (e.g there's a tab navigator that let's you put a bunch of tabs up at the top and the content changes depending on which tab you click on).
Another popular navigator container is the ViewStack (http://j.mp/icGfVQ).
|
Flex 4 In Action
Become Effective Fast
|
 |
Tariq Ahmed
Author
Greenhorn
Joined: Feb 16, 2010
Posts: 7
|
|
Oh and on the topic of MVC frameworks - they most certainly can help you with the separation of concerns.
in the book we have a big chapter on architecture and cover in depth the RobotLegs MVC framework, http://www.robotlegs.org/ (one of the authors, Joel Hooks, is a member of the RobotLegs team). Another option is the Swiz framework (http://swizframework.org/). Both are made to be lightweight and simple.
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2231
|
|
To go one from one MXML "page" to another MXML doesn't quite translate in that context.
I am sorry for the Late Response , but if your problem is that , navigating from one MXML to another MXML , then why dont you use SWFLoader . As every MXML component would be converted into an swf file , depending upon the Action of the user , use SWFLoader load method of it .
Your google search should be "SWFLoader from Actionscript + Flex 3" ?
Thnaks
|
 |
Ratan Kumar Yadav
Greenhorn
Joined: May 02, 2008
Posts: 6
|
|
|
We can use navigational Containers like:- Tabnavigator,Viewstack,Tabbar etc
|
 |
 |
|
|
subject: Navigate from one mxml to another mxml
|
|
|