Passing data from an XML object to an itemRenderer

I'm trying to color the background of a column in a datagrid and have found a sample file that illustrate the concept. However, the sample has data stored in an arrayCollection whereas mine is in an XML object. The problem is that the data in the sample file is apparently automatically passed to the itemRenderer (shown below: note the trace statement). My XML object does not appear to automatically pass data to the itemRenderer. So my questions are:
1. Is there a simple way to pass data stored in an XML object to an itemRenderer
or
2. Should I convert my XML to an arrayCollection? If so, what's the best way to do this-- I've tried the following, but without success:
<mx:Model id="xmldata" source="example3.xml"/>
  <mx:ArrayCollection id="myAC" source="{ArrayUtil.toArray(xmldata.Example1)}" />
Here's what the xml looks like:
<TABLE>
   <EXAMPLE1>
      <difficulty> 0.5 </difficulty>
      <discrimination> 0.7 </discrimination>
      <item> 3 </item>
   </EXAMPLE1>
</TABLE>  
Here's the itemRenderer:
<?xml version="1.0" encoding="utf-8"?>
<mx:Label xmlns:mx="http://www.adobe.com/2006/mxml">
    <!--
        This item renderer simply extends Label and overrides the updateDisplayList function to
        draw a gradient-filled rectangle. The colors in the gradient are determined from the
        data.
    -->
    <mx:Script>
    <![CDATA[
        import flash.geom.Matrix;
        import flash.display.GradientType;
        import flash.display.Graphics;
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
            super.updateDisplayList(unscaledWidth,unscaledHeight);
            var m:Matrix = new Matrix();
            m.createGradientBox(unscaledWidth,unscaledHeight);
            var g:Graphics = graphics;
                        trace("data.col3="+data.col3)
            var colors:Array = (data.col3 < 2000 ? [0x0000CC,0x0000FF] : [0x00CC00,0x00FF00]);
            g.clear();
            g.beginGradientFill(GradientType.LINEAR, colors, [0.2,0.6], [0,255], m);
            // the rectangle is drawn a little high and a little tall to compensate for the gap
            // the DataGrid introduces between rows.
            g.drawRect(0, -2, unscaledWidth, unscaledHeight+4 );
            g.endFill();
    ]]>
    </mx:Script>
</mx:Label>

This sample code should answer your question of how to bring data into the renderer automatically. It comes in via the DataGrid dataProvider and then you refer to it in the renderer as data.XYZ, where XYZ is the field in the XML with the data. See FB 3 help sys on e4x syntax.
------------------ mainapp.mxml --------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  creationComplete="srvc.send();">
  <mx:Script>
    <![CDATA[
      import mx.rpc.events.ResultEvent;
      import mx.collections.XMLListCollection;
      [Bindable] private var xlc:XMLListCollection;
      private function dataHandler(evt:ResultEvent):void{
        xlc = new XMLListCollection(evt.result..EXAMPLE1 as XMLList);
    ]]>
  </mx:Script>
  <mx:HTTPService id="srvc" url="data2.xml" result="dataHandler(event)"
    resultFormat="e4x"/>
  <mx:DataGrid dataProvider="{xlc}">
    <mx:columns>
      <mx:DataGridColumn headerText="Difficulty" dataField="difficulty"/>
      <mx:DataGridColumn headerText="Discrimination" dataField="discrimination"/>
      <mx:DataGridColumn headerText="Item" itemRenderer="MyLabel"/>
    </mx:columns>
  </mx:DataGrid>
</mx:Application>
----------- MyLabel.mxml --------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Label xmlns:mx="http://www.adobe.com/2006/mxml">
  <mx:Script>
    <![CDATA[
      import flash.geom.Matrix;
      import flash.display.GradientType;
      import flash.display.Graphics;
      override protected function updateDisplayList(unscaledWidth:Number,
        unscaledHeight:Number):void{
        super.updateDisplayList(unscaledWidth,unscaledHeight);
        this.text = data.col3;
        var m:Matrix = new Matrix();
        m.createGradientBox(unscaledWidth,unscaledHeight);
        var g:Graphics = graphics;
        var colors:Array = (data.col3 < 2000 ? [0x0000CC,0x0000FF] : [0x00CC00,0x00FF00]);
        g.clear();
        g.beginGradientFill(GradientType.LINEAR, colors, [0.2,0.6], [0,255], m);
        g.drawRect(0, -2, unscaledWidth, unscaledHeight+4 );
        g.endFill();
    ]]>
  </mx:Script>
</mx:Label>
------------ data2.xml ----------------
<?xml version="1.0" encoding="utf8"?>
<TABLE>
   <EXAMPLE1>
      <difficulty> 0.5 </difficulty>
      <discrimination> 0.7 </discrimination>
      <col3> 3 </col3>
   </EXAMPLE1>
</TABLE>

Similar Messages

  • Passing data from one UIX XML page to another UIX XML page

    What are the various ways of passing data from one UIX XML page to another UIX XML page?
    (a) If no bc4j is used.
    (b) If bc4j is used.
    (c) If my event handler calls:-
    public static EventResult handleMyEventEvent( BajaContext context, Page page, PageEvent event) throws Throwable
    then how can I pass data to the next UIX XML page?
    Thanks,
    Paul.

    What are the various ways of passing data from one UIX XML page to another UIX XML page?
    (a) If no bc4j is used.For forwarded URLs; HttpServletRequest attributes [request], HttpSession attributes [session], ServletContext attributes [application].
    For redirected URLs; HttpServletRequest parameters url, HttpSession attributes [session], ServletContext attributes [application].
    (b) If bc4j is used.For forwarded URLs; BC4J Session properties.
    For redirected URLs; BC4J Session properties IF release mode is NOT stateless.
    (c) If my event handler calls:-
    public static EventResult handleMyEventEvent( BajaContext context, Page page, PageEvent event) throws Throwable
    then how can I pass data to the next UIX XML page?Return a UIEventResult (extends EventResult) from your event handler that has a data provider attached.
    This data provider will be accessible in the next page with the name "ctrl:eventResult", where "ctrl" is the short prefix for the namespace "http://xmlns.oracle.com/uix/controller".
    Regards,
    John Fallows
    Oracle Corporation.

  • Passing data from a panel to a frame / disposing of a frame from in a panel

    Hello, I have recently created a program where all windows are made of seperate frames, now, to make the whole thing a bit more appealing and professional looking, i'd like to make 1 main frame, and load my content panels into this 1 frame. Problem i'm having with this is passing data from the loaded in panel to the main frame, so the main frame can hide one panel to load another with data inserted in the first panel. OR another solution to my problem would be a way to dispose of a frame, but from within the seperate panel class. I have searched the www for a solution, but haven't found one so far, so, any suggestions or references to some info about this kind of issue? Any pointer is greatly appreciated

    kennethdm wrote:
    EDIT: I took a look at the cardlayout, and, although i see its relevance to my question, it still leaves me with the question how exactly i will pass data the user inputs into the first panel, to the second panel. The second panel is built by the info which is provided in the first panel.Stop thinking of them as Panels and start thinking of them as OOP objects that have data that must be shared. It's often a matter of using getters and setters and sometimes requiring a sprinkling of the Observer design pattern.

  • Error in Reading data from a xml file in ESB

    Hi,
    i created a inbound file adapter service which reads data from a xml file and passes it to the routing service and from there updates to the database.....
    (everything created in jdeveloper)
    But i am getting error....it is not getting updated to the database...when i check the database(select * from table) its showing one row selected but i couldnt find the data....
    Transformation mapping also i did...
    i think may be some error in reading the data from the xml file but not so sure.....
    please reply to this mail as soon as possible its very urgent

    Michael R wrote:
    The target table will be created when you execute the interface, if you set the option on the flow tab as instructed in step #6 of the "Setting up ODI Constraint on CLIENT Datastore" Section.
    Option     Value
    CREATE_TARG_TABLE      trueHi Michel,
    This was not my required answer.I am sorry that I was unable to clarify my question.Actually
    +This project executed successfully with some warning.Target Table is automatically created in database and also populated with data.But when I right-click Target Datastore(in >Mapping Tab of the Interface), and then select Data to View Data that needs to be inserted in the target table.I get some error like this:-...+This above line is the result of my project my problem is
    when I right-click Target Datastore(in Mapping Tab of the Interface), and then select Data to View Data that already inserted in the target table.Is not shown by the view data operation.
    I meant to say I am facing this error
    At the10(1010 written) step of
    Creating a New ODI Interface to Perform XML File to RDBMS Table Transformation
    wehre it says
    Open the Interface tab. Select Mapping tab, right-click Target Datastore - CLIENT, and then select Data. View Data inserted in the target table. Close Data Editor. Close the tabs...
    In my case when I use my sqldeveloper I can see data successfully inserted in my target table and also in error table (data that can't satisfy the constraint) .But I was unable to check this by following the above mentioned 10 th step and got this error.
    Thanks

  • Passing data from Oracle stored procedures to Java

    We're going to write a new web interface for a big system based on Oracle database. All business rules are already coded in PL/SQL stored procedures and we'd like to reuse as much code as possible. We'll write some new stored procedures that will combine the existing business rules and return the final result dataset.
    We want to do this on the database level to avoid java-db round trips. The interface layer will be written in Java (we'd like to use GWT), so we need a way of passing data from Oracle stored procedures to Java service side. The data can be e.g. a set of properties of a specific item or a list of items fulfilling certain criteria. Would anyone recommend a preferable way of doing this?
    We're considering one of the 2 following scenarios:
    passing objects and lists of objects (DB object types defined on the schema level)
    passing a sys_refcursor
    We verified that both approaches are "doable", the question is more about design decision, best practice, possible maintenance problems, flexibility, etc.
    I'd appreciate any hints.

    user1754151 wrote:
    We're going to write a new web interface for a big system based on Oracle database. All business rules are already coded in PL/SQL stored procedures and we'd like to reuse as much code as possible. We'll write some new stored procedures that will combine the existing business rules and return the final result dataset.
    We want to do this on the database level to avoid java-db round trips. The interface layer will be written in Java (we'd like to use GWT), so we need a way of passing data from Oracle stored procedures to Java service side. The data can be e.g. a set of properties of a specific item or a list of items fulfilling certain criteria. Would anyone recommend a preferable way of doing this?
    We're considering one of the 2 following scenarios:
    passing objects and lists of objects (DB object types defined on the schema level)
    passing a sys_refcursor
    We verified that both approaches are "doable", the question is more about design decision, best practice, possible maintenance problems, flexibility, etc.
    I'd appreciate any hints.If logic is already written in DB, and the only concern is of passing the result to java service side, and also from point of maintenance problem and flexibility i would suggest to use the sys_refcursor.
    The reason if Down the line any thing changes then you only need to change the arguments of sys_refcursor in DB and as well as java side, and it is much easier and less efforts compare to using and changes required for Types and Objects on DB and java side.
    The design and best practise keeps changing based on our requirement and exisiting design. But by looking at your current senario and design, i personally suggest to go with sys_refcursor.

  • How to pass data from one internal session to another

    Hi SAP Experts,
    How to pass data from one internal session to another and from One external session to another external session. I used import and export parmeter and SPA/GPA parameters. What is the other way to pass data?
    Please tel me urgently
    Thank you
    Basu

    Memory Structures of an ABAP Program
    In the Overview of the R/3 Basis System you have seen that each user can open up to six R/3 windows in a single SAPgui session. Each of these windows corresponds to a session on the application server with its own area of shared memory.
    The first application program that you start in a session opens an internal session within the main session. The internal session has a memory area that contains the ABAP program and its associated data. When the program calls external routines (methods, subroutines or function modules) their main program and working data are also loaded into the memory area of the internal session.
    Only one internal session is ever active. If the active application program calls a further application program, the system opens another internal session. Here, there are two possible cases: If the second program does not return control to the calling program when it has finished running, the called program replaces the calling program in the internal session. The contents of the memory of the calling program are deleted. If the second program does return control to the calling program when it has finished running, the session of the called program is not deleted. Instead, it becomes inactive, and its memory contents are placed on a stack.
    The memory area of each session contains an area called ABAP memory. ABAP memory is available to all internal sessions. ABAP programs can use the EXPORT and IMPORT statements to access it. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.
    All ABAP programs can also access the SAP memory. This is a memory area to which all sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters are often used to preassign values to input fields. You can set them individually for users, or globally according to the flow of an application program. SAP memory is the only connection between the different sessions within a SAPgui.
    The following diagram shows how an application program accesses the different areas within shared memory:
    In the diagram, an ABAP program is active in the second internal session of the first main session. It can access the memory of its own internal session, ABAP memory and SAP memory. The program in the first internal session has called the program which is currently active, and its own data is currently inactive on the stack. If the program currently active calls another program but will itself carry on once that program has finished running, the new program will be activated in a third internal session.
    Data Clusters in ABAP Memory
    You can store data clusters in ABAP memory. ABAP memory is a memory area within the internal session (roll area) of an ABAP program and any other program called from it using CALL TRANSACTION or SUBMIT.
    ABAP memory is independent of the ABAP program or program module from which it was generated. In other words, an object saved in ABAP memory can be read from any other ABAP program in the same call chain. ABAP memory is not the same as the cross-transaction global SAP memory. For further information, refer to Passing Data Between Programs.
    This allows you to pass data from one module to another over several levels of the program hierarchy. For example, you can pass data
    From an executable program (report) to another executable program called using SUBMIT.
    From a transaction to an executable program (report).
    Between dialog modules.
    From a program to a function module.
    and so on.
    The contents of the memory are released when you leave the transaction.
    To save data objects in ABAP memory, use the statement EXPORT TO MEMORY.
    Saving Data Objects in Memory
    To read data objects from memory, use the statement IMPORT FROM MEMORY.
    Reading Data Objects from Memory
    To delete data clusters from memory, use the statement FREE MEMORY.
    Deleting Data Clusters from Memory
    please read this which provide more idea about memory
    Message was edited by:
            sunil kumar

  • Passing data from check FM

    Hi,
    Wanted to know how to pass data from check FM to workflow container?
    We are not able to add parameters for event container as it is standard event.
    Can we set attribute of object ? I could not find macro for setting property.
    Expecting urgent help.
    Regards,
    Akshay

    Hi Akshay,
    Trying to pass data from check FM to workflow container is the wrong approach to use.  The purpose of a check FM is ONLY to see if the workflow should be started by the event or not.  You cannot and should not even attempt to change the event container in a check FM.
    What you need to do is to take a step back and think about your options:
    1. "Not able to add parameters ... as it is a standard event".  Well you can extend the event parameters on a standard event by creating a delegated subtype of the standard object type.  However if the event is raised by standard code this may not help you anyway.   It's worth reading the SAP Library doco on this as some types of events do pass additional information provided you define the event parameter names correctly, e.g. change document events will automatically pass the old/new value of certain fields.
    2. Is the data you are trying to pass related to:
    a) The object - then use attributes of the object instead to calculate the value
    b) The person creating the event - then use attributes of the event creator, i.e. as soon as the workflow starts, add a step to instantiate an instance of an object representing the user such as USR01 or USR01DOHR.
    c) Other standard data in the event container such as the calling program id, the date/time - any of that info can be passed to your workflow container and then used to derive further info from there.
    3. If the data you are trying to pass is only available in the standard calling application, then you need to find another way to raise the event or raise a custom event.  E.g. in a user exit or BADI.
    4. And one final option of last resort - create your own RECEIVER function module - this does allow you to fill the workflow container during the event linkage.  But I would still consider this a "last resort" option.
    Regards,
    Jocelyn
    Message was edited by: Jocelyn Dart

  • Passing data from JavaScript to Applets (Error when trying to pass data)

    Hi,
    I've wrote a small applet for lists but when I try to pass data from my
    JavaScript to my applet, I get an "Error: Object doesn't support this property or method". I get this error with a select other sites including the page I'm writing, leading me to believe I may not have installed requried files or set required options. I've included the listing of the code snippet where the error occurs.
    document.listApplet.testMethod()OR when I use:
    document.applet(listApplet).testMethod()The applet is loaded by this statement:
    <OBJECT CODE="CustomAppletList" NAME="listApplet" ID="listApplet" WIDTH="1000" HEIGHT="600"></OBJECT>and loads fine but no data is passed through it's public methods. Can anyone suggest ideas how I can successfully pass data from my JavaScripts to my applets?
    Devyn

    this should work for you. In your javascript do this.
    var myApplet=document.listApplet;
    myApplet.testMethod()
    If you need more help let me know.
    Paul

  • Passing data from Javascripts to Applets

    Hi,
    I've wrote a small applet for lists but when I try to pass data from my
    JavaScript to my applet, I get an "Error: Object doesn't support this property or method". I get this error with a select other sites including the page I'm writing, leading me to believe I may not have installed requried files or set required options, though I've checked my settings . I've included the listing of the code snippet where the error occurs.
    document.listApplet.testMethod()OR when I use:
    document.applet(listApplet).testMethod()The applet is loaded by this statement:
    <OBJECT CODE="CustomAppletList" NAME="listApplet" ID="listApplet" WIDTH="1000" HEIGHT="600"></OBJECT>and loads fine but the error persists when attempting to call public method in my applet. Can anyone suggest ideas how I can successfully pass data from my JavaScripts to my applets?
    Devyn

    Hi,
    Thnx for the reply. I've tried as you suggested and modified my <OBJECT> line to:
    <OBJECT CODE="CustomAppletList.class" NAME="listApplet" ID="listApplet" WIDTH="1000" HEIGHT="600">
    <PARAM NAME="scriptable" VALUE="true"></PARAM>
    </OBJECT>But the error persists. I'm using IE6. I did not have such errors with IE5.
    I use the following code to test the applet tag I assigned at each step:
                        if (document.listApplet) {
                             document.write ("Applet Object (document.listApplet) exists.")
                        } else {
                             return
                        if (document.listApplet.object) {
                             document.write ("Applet Object (document.listApplet.object) exists.")
                        } else {
                             return
                        if (document.listApplet.object.testMethod) {
                             document.write ("Method textMethod() in applet has been validated and exists!")
                        } else {
                             document.write ("[2]")
                             return
                   document.write ("[11]")The debugging info from this code at the end of the html document I'm writing is:
    [1]Applet Object (document.viewer) exists.Applet Object (document.viewer.object) exists.[2][11]
    Devyn

  • Problem in passing data from one .jsp page to another .jsp page

    i have a problem here
    Actually i have 2 jsp pages. What im trying to do here is actually i want to pass data from the first jsp page to the second for updating
    The first jsp page contains data that user wants to update in the form of table.
    <td><img src = "edit.gif" alt = "edit" border="0" ><td>
    <TD><%= Name %></td>
    <TD><%= rs.getInt("Age") %></td>
    <TD><%= rs.getString("Gender") %></td>
    So this page displays the data that users wants to update plus one image button (edit button). So when user clicks this button, all the data in this page will be brought to the second .jsp page called updatePersonal for updating.
    The problem here is that it is not displaying the existing data in the second .jsp page.
    The second page basically contains forms
    <INPUT TYPE="text" NAME="FirstName" maxlength="30" value = "<%=FirstName%>">
    Can someone please help me. I really dont know what to do..How do i get the data displayed in the text field that is passed from the first .jsp page..thankx in advance

    Please modify below code to:
    td><img src = "edit.gif" alt = "edit" border="0" ><td>
    -----------------modified code
    td><a href="updatePersonal.jsp?FirstName=<%=rs.getString(FirstName")%">&LastName=<%=rs.getString("LastName")%>&Age=<%=rs.getInt("Age")%>&Gender=<%=rs.getString("Gender")%>"><img src = "edit.gif" alt = "edit" border="0" ></a><td>
    I'm sure it works</a>

  • How can I pass data from a form guide to another form in a business process

    How do we pass data from a form guide to another form(not necessarily a guide) without having to open the form. For example we have a small form guide to capture the contract id so we can then get data from contracts table to present to the user in a form. We want the user to open the guide (either Flex guide or form guide) to enter the contract id. Upon submission we want the process to get the contract data and put it into the form that will be opened at the next step by the user without having a user interact with the form to get the data into it. In other words we need the process to get the data and populate a different form than the form guide the contract id was entered in and this new form needs to be opened in the next step by the user.

    Firstly, I'm assuming that you have a Forms ES Server if you are rendering a Guide.  This could be either version ES1, ES2/2.5 or ES3/ADEP
    If you submit the form back to the server, you can populate a second (PDF/XDP) form with the data bound to the same schema/Data Model using Forms ES. 
    You referred to the next user in the chain - If you are using Process Management, this is very easy, as you define what form is used to render the data in the "Presentation & Data" section of the Assign Task activity

  • I need to pass data from an Access database to Teststand by using the built in Data step types(open data

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1i need to pass data from an Access database to Teststand by using the built in Data step types(open database /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1
    When I tried the same thing on another cmputer the same thing
    happend
    appreiciate u"r help

    base /open SQL Statement etc) the first time i defined the system everything was fine but when i changed the Database (using M.S.Access) the " open SQL Statement" it would show the tables but not thier columns ,I"m using win98 sec edition / Teststand 1.0.1Hello Kitty -
    Certainly it is unusual that you can still see the tables available in your MS Access database but cannot see the columns? I am assuming you are configuring an Open Statement step and are trying to use the ring-control to select columns from your table?
    Can you tell me more about the changes you made to your file when you 'changed' it with MS Access? What version of Access are you using? What happens if you try and manually type in an 'Open Statement Dialog's SQL string such as...
    "SELECT UUT_RESULT.TEST_SOCKET_INDEX, UUT_RESULT.UUT_STATUS, UUT_RESULT.START_DATE_TIME FROM UUT_RESULT"
    Is it able to find the columns even if it can't display them? I am worried that maybe you are using a version of MS Access that is too new for the version of TestSt
    and you are running. Has anything else changed aside from the file you are editing?
    Regards,
    -Elaine R.
    National Instruments
    http://www.ni.com/ask

  • Passing data from one frame to another frame

    hello all, i am having a problem with passing data from one frame from another. I have a main frame when you click on connect button it display the second frame(class) that has 2 text fields and 2 buttons. When i click on connect it check if the data is correct. If the data is correct i want that frame to close and pass the data back to main frame. How can i do that.
    thank you

    hello all, i am having a problem with passing data
    from one frame from another. I have a main frame when
    you click on connect button it display the second
    frame(class) that has 2 text fields and 2 buttons.
    When i click on connect it check if the data is
    correct. If the data is correct i want that frame to
    close and pass the data back to main frame. How can
    i do that.
    thank you
    the original problem sounded like an ideal opportunity to use Modal Dialog. if you want one frame to display another to get user input then you need to stop the method in the main frame from executing until you recieve a valid input.
    you can use your own class and keep all of the components that you have in the connect frame but you would have to extend JDialog instead of JFrame.
    there is a way around it!
    if you must use JFrame for both, then you need to have access to the main frame in the connect frame, maybe pass the pointer to the constructor??
    anyway, when the connect frame is done with its duties, you have to use the pointer to call another method in the main frame that will continue the process. otherwise main frame doesn't know when connect frame is done and by that time, the method in main frame that instantiated the connect frame has long since died.
    also, it allows things to happen in the other window that you may not want to happen until the connect frame is done
    typically users of software start clicking around on things and you could have three or four connect frames going at the same time
    it's really best to use a Modal Dialog, it really can look just like a JFrame!!!!!!!!!!!!!!

  • Passing data from a container to another

    Hi,
    Let's say I have two containers (Container1=application , Container2).  Container1 gets some data from user, perform some database lookup and displays Container2 with the results from database lookup.
    Container1 --(call and display)--> Container2
    Below shows  how I am using a bindable variable in Container1 to pass the data from Container1 to Container2.  Also shows how I display Container2 from Container1.
    <!-- Container1 -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
       [Bindable] public var foo:String = "bar";
       private function loginHandler(event:LoginEvent):void
          mycontainer2 = new Container2();
          mycontainer2.name = "mycontainer2";
          this.addChild(mycontainer2);
    </mx:Application>
    I am accessing the data in Container2 as follow:
    <!-- Container2 -->
    {mx.core.Application.application.foo}
    Q1) Is there a better way to pass data from one container to another and access the data?
    Q2) Is this the only way to call and display Container2 from Container1?
    Q3) How can I move back to Container1 from Container2, i.e. Container2 call and display Container1
           Container2 --(back to)--> Container1

    Best practices call for using custom events to share data between components. Here is my Flex 3 Cookbook post on the topic:
    http://cookbooks.adobe.com/index.cfm?event=showdetails&postId=15466
    To switch easily between containers 1 & 2 use a ViewStack, the gold standard for such interaction, and manipulate the selectedIndex or selectedChild property:
    http://livedocs.adobe.com/flex/3/html/help.html?content=navigators_3.html
    If this post answered your question or helped, please mark it as such.

  • Is it possible to pass data from a subVI before that subVI has finished executing?

    Basically this is my problem:
    1.  I have a subVI which contains a loop that reads data from a device for a specified amount of time.
    2.  I would like to graph this data in real time on the front panel of the main VI.
    So is there a way to pass data from inside the loop of my subVI to the graph of my main VI before the subVI has finished executing, and if so how do I do this?
    Thank you.

    How about using a global variable or a Queue?

Maybe you are looking for

  • Problem with spry in IE

    hey guys im having a problem with Spry in IE only.. Ive tried the corrent browsers and it seems to be working well Firefox Opera Safari but Internet Explorer is not working the menus just wont drop down past my flash player? any help would be great h

  • Performance of ramjournal

    Hi, Has someone done some tests with ramjournal? What I found is that the performance of versionedPutAll gets worse when the cache size grows. Is this the case for anyone? I am using 2 nodes storage enabled and a cache in distributed-scheme. I am usi

  • HP Photosmart 8250

    My HP photosmart 8250 only prints from a memory card.....one day it completely stopped printing when it was connected to my PC. I uninstalled it from my pc, went back in to re-install it but the software install wouldn't take as error msg came up and

  • MeetingPlace conference call on CCM MoH

    Has anyone seen this, or have any ideas? Have a MeetingPlace Enterprise 5.4.0 system and now and then, people on hold on Call Manager (multicast MoH) can here meetingplace conference calls when they are on hold with the CCM MoH playing. The people on

  • I18N  : Translation to Japanese : S2X editor does not accept Japanese char

    Hi , I need to translate an WDJ application to Japanese. I have set the project resource encoding to UTF-8 and also changed the jp xlf file encoding to UTF-8. When I enter the characters in s2x editor and click save , it reverts back to English chara