This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Calling one mxml file from another

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Can we call 1 mxml from another mxml? How to we do it?
Any pointers to it would be much appreciated.

Thanks,
Neelima
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. Create an instance of whatever component your mxml file defines and there you go.
 
Neelima Mohan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 1 mxml file which contains couple of components...this is like 1 screen...on clicking the next button it should call another mxml with a different set of components like 2 textfield etc....how to implement this navigation?

Thanks,
Neelima
 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type do these mxml files define? Canvases? Panels? Applications?

 
Neelima Mohan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one file is 1 mxml with an application tag and a canvas within it. I want to call this mxml to call yet another mxml which again has a canvas details inside an application tag. this is to emulate a screen flow.

Visualize this requirement as a data entry form. On screenload the user types in data into the fields defined in the first mxml. There is a next button. On click of the next button the next mxml will be called and the fields defined in that second mxml gets displayed to the user. User types in the details and then finally clicks the save button to make a call to the service layer.

I am not able to get information on how to call 1 independent mxml from another mxml.

Thanks,
Neelima
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think States would help, try googling Flex States.

and Inorder to call one mxml from another, you can do in two ways.

one is you can import the mxml as other class like Panel,Canvas etc and invoke method on it.
and another is compiling the dependant mxml and embed as local file.

Think which option would fit your requirement?
 
I like tacos! And this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic