How to pass a value from 1 mxml componet to the another mxml componet

I have created 3 mxml components. I am using 1st component as
a container component for other 2 components mean[ inside 1st
component i have placed 2 other components]. now i want to pass
selectedvalue from 1 component to another component.
say 1st component is
MyFirstComponent.mxml
2nd component is
MySecComponent.mxml
3rd component is
MyThirdComponent.mxml
now i have place 2nd & 3rd component in 1st component.
whenever i select an item from dropdown in 2nd component i want to
set/pass that selectedvalue to 3rd component public variable. how
can i achieve this.
MySecondComponent.mxml
[code]
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:salesforce="
http://www.salesforce.com/"
creationComplete="login()">
<mx:ComboBox x="102" y="26" id="ddlDepartmentName"
cornerRadius="2" height="20"
fontWeight="bold" width="148"/>
</mx:Canvas>
[/code]
MyThirdComponent.mxml
[code]
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:salesforce="
http://www.salesforce.com/"
creationComplete="login();">
<mx:Script>
<![CDATA[
import SubComponents.Department.DepartmentSummary;
public var departmentID:String = 10;
]]>
</mx:Script>
</mx:HBox>
[/code]
right now i am using hardcoded departmentID in 3rd component,
i want to remove the hardcoded value and i want to set the value
from 2nd components' on selectionChange.
When i select department Name from the comboBox which is
created in 2nd component i want to get the value in 3rd component.
how can i achive this..
want to set the departmentID in 3rd component to the
ddlDepartmentName.selectedValue in 2nd component. when i change the
selected value in 2nd component i want to display the department
information in 3rd component after setting the departmentID
Waiting for your valuable answer.

This code seems to work:
------------------ MyThirdComponent.mxml -------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:salesforce="
http://www.salesforce.com/">
<mx:Script>
<![CDATA[
[Bindable]
public var departmentID:String = new String();
]]>
</mx:Script>
<mx:Text text="{departmentID}"/>
</mx:HBox>
------------------------- MySecondComponent.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:salesforce="
http://www.salesforce.com/">
<mx:Script>
<![CDATA[
public function changeHandler():void{
this.parentApplication.my3rd.departmentID =
ddlDepartmentName.selectedLabel;
]]>
</mx:Script>
<mx:ComboBox x="102" y="26" id="ddlDepartmentName"
cornerRadius="2" height="20"
fontWeight="bold" width="148" change="changeHandler()">
<mx:ArrayCollection>
<mx:String>Bananas</mx:String>
<mx:String>Apples</mx:String>
<mx:String>Oranges</mx:String>
</mx:ArrayCollection>
</mx:ComboBox>
</mx:Canvas>
----------------------- Test.mxml
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:comp="components.*" creationComplete="init()">
<mx:Script>
<![CDATA[
public function init():void{
my3rd.departmentID = my2nd.ddlDepartmentName.selectedLabel;
]]>
</mx:Script>
<comp:MyThirdComponent id="my3rd"/>
<comp:MySecondComponent id="my2nd"/>
</mx:Application>

Similar Messages

  • How to pass a value from jspx page to the managed bean

    hi,
    i have created a jspx page and manages bean with page flow scope..
    in my jspx page i am searching a employee record from the data base . and getting entire employee details including 'status' as a search result.
    here i want to pass the value of 'status ' field to the managed bean variable called 'stval'.
    can anybody suggest any solution?.......

    As per the details provided in the post above, when the user clicks on the search in the af:query, the results are populated in the table. And you are interested in getting the value of particular column. This could be done by having the custom row selection listener to get the value of the current row (selected row in the table).
    1) Have a custom selection listener:
    <af:table value="#{bindings.EmpDeptVO.collectionModel}" var="row"
    rows="#{bindings.EmpDeptVO.rangeSize}"
    emptyText="#{bindings.EmpDeptVO.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.EmpDeptVO.rangeSize}"
    rowBandingInterval="0"
    rowSelection="single" id="t1"
    partialTriggers=":::qryId1 ::ctb1 ::commandToolbarButton1"
    columnStretching="column:c1"
    styleClass="AFStretchWidth" columnSelection="multiple"
    first="0" contentDelivery="immediate" autoHeightRows="10"
    binding="#{pageFlowScope.ExampleBean.searchResultsTable}"
    *selectionListener="#{pageFlowScope.ExampleBean.rowSelected}">*
    2) In the method, set the current row programmatically:
    ADFUtil.invokeEL("#{bindings.EmpDeptVO.collectionModel.makeCurrent}",
    new Class[] { SelectionEvent.class },
    new Object[] { selectionEvent });
    3) Get the current row and get the required attribute values and set it in any of the variables in the managed bean:
    Row selectedRow =
    (Row)ADFUtil.evaluateEL("#{bindings.EmpDeptVOIterator.currentRow}");
    String status = selectedRow.getAttribute("Status");
    Thanks,
    Navaneeth

  • How to pass multiple values from workbook to planning function ?

    Hi,
    I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
    When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
        A.) input one value -> V1
        B.) input three values -> V1;V2;V3
    This function execute completely in web.
    However, I want to use the planning function in workbook(Excel).
    The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
    thank you.

    Hi,
    Please see the attached how to document (page no 16).
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
    Hope this was helpful
    thanks

  • How do you log values from RT target to the computer?

    Hi,
    I am using sbRIO 9633. How do you log values from RT target to the computer?
    I created a shared variable on the RT target and used them on the log VI created under "My Computer", but I get error.
    I get this error..
     \\192.168.1.140\temp deployment failed (error: -1967357949, IAK_SHARED:  (Hex 0x8ABC8003) Unable to query Measurement & Automation Explorer for the Shared Variable Engine. Make sure the Shared Variable Engine exists on the RT target and check that the network connection is valid.).
    kdm

    What are your data rates?  If you are producing data "continuously", you might find that Network Streams are easier and more reliable than Network Shared Variables.  In any case, you need an "engine" on one side (Host or Target) or the other.  I'm streaming 24 channels of 16-bit data from a PXI controller to a PC this way, with three other streams handling two-way messaging and transmission of "occasional" time-stamped data to the PC.
    Bob Schor

  • How to pass a value from the report to a form ( BIT OF URGENT ).

    Hi,
    I had created a "Form on a Table with Report" on the report I had remove the edit link and set one of the column feilds that functionality. Now I want to know how to pass that value that is clicked ( having hyper link ) on to the form where it runs a SQL query and then displays the reuslts on the form.
    Illustrating with an example.
    I am having these following columns on the report ( these are the results for the join statement )
    JOBNUM JOBNAME DEPTNUMBER SAL EMPNO LNAME FNAME
    In the above JOBNUM is having Hyper link as I removed the edit image.
    Now this is area I am having problem. When the user clicked on the JOBNUM then on form it should display 20 other columns( pulled from 5 other tables ) which are related to that particualr JOBNUM.
    Anybody give me a solution in which area I have to include my SQL statement and how to pass that selected value to that SQL statement.
    Cheers,
    Krishna

    Hi Ron,
    I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
    I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
    Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
    Thanks for your help in advance.
    Cheers,
    Krishna.

  • How to pass Multivalue parameters from main report to the subreport to a database stored procedure

    I am having a Main Report, where the user selects the parameters, and calls the subreport which in turn calls the stored proc which updates the report parameters table, which will be used by all the other sub reports to filter data on.
    It works fine when I pass single values from the Main report to the sub report, and it updates the database, but when I map the formula field to the subreport, the subreport does not even show up, and nothing happens on the database. I am thinking the subreport is not executing. I am using the 'Change Subreport Links' to map the formula fields to the subreport parameters.
    Please let me know if there is any other work around or a sample report which solves a similar problem.

    That is definitely a problem. CR 11.0 has been out of support for 5+ years(?). CR 11.5 has been out of support for close to 3 years.
    As far as I am concerned, the suggestions given here are going for naught as presumably they are based on recent builds of CR (E.g.; CR 12.x or higher). I really doubt that Abhilash or Jamie remember if CR 11.0 had problems related to the issue at hand. But they do know that their suggestions work in current versions of CR.
    Thus a suggestion; I suspect that you should be able to obtain an image from your IT where you can install CR 11.0 and update it to CR 11.5. Then use this as a proof of concept to the powers that be in your org that it is time to get with the times. BTW.; the most current version of CR is CR 2013, version 14.1.x(!). Again, something that your org should be aware of. So, even better than updating the image to CR 11.5, download the free 30 day eval of CR 2013 and try the suggestions in that version. The eval download is here:
    SME Free Trials | SME Software | SAP
    BTW.; CR 2013 is a side by side install, meaning that it will happily co-exist with your current CR 11.0 install.
    - Ludek

  • How to pass all values from one node element to created node element?

    Hi
    I have model node element under which there are 7 values, and I've created value node element and trying to pass the values from the model node Element to this value node element. But instead of passing all the values its listing only one value.
    How do we rectify this problem!!!
    Thanks in Advance
    Srikant

    Hi Anil
    I've created the node named: TableNode
    and the name of the node from which i want to get the data is : Li_Required_Node
    the Node Structure is
    Context
      |_ Zs_Quantity_Input
         |_Output
           |_Node_Required_Node
              |_Schddt
      |_TableNode
        |_CmpDate
    The Schddt has some 7 values
    The code Snippet is as follows:
    IPublicPricesComp.ITableNodeElement nodeElement;
    IPublicPricesComp.ILi_Required_NodeElement scheduleElement;
    int counter3Max = wdContext.ILi_Required_Node().size();
    for( int counter3= 0 ; counter3 < counter3Max ;counter3++ )
    nodeElement = wdContext.createTableNodeElement();
                             scheduleElement = wdContext.nodeZs_Quantity_Input().nodeOutput_Contract_Qty().nodeLi_Required_Node().getLi_Required_NodeElementAt(counter3);
    nodeElement.setCmpDate(scheduleElement.getSchddt());
    wdContext.nodeTableNode().addElement(nodeElement);               
    On writing the above code and then binding the node to a table column only one value getting displayed
    Where can be the error?
    Thanks in Advance
    Srikant

  • How to pass multiple values from master to child report

    Hello,
    How would I pass multiple prompts from the master to child report? So for example, say I want to pass a 'Country' value along with a 'City' value
    Would it be?
    ="<a href=\"../../opendoc/openDocument.jsp?iDocID=ASQlgCemIOlEid1HHUlzyPs&sDocName=DocTest&sIDType=CUID&sType=wid&sWindow=Same&lsSCountry="+[Country]+"&lsSCity="+[City]+"\</a>"
    Thanks,
    Carter

    Carter,
    what is the syntax for this?
    It is exactly how you have posted in your original note.
    "&lsSCountry="+[Country]+"&lsSCity="[City]
    This will work providing the target report has a prompt called "Country" and another prompt called "City".  Note that your prompt and what you pass between the &lsS and the equal (=) must match exactly, otherwise OpenDocument will not communicate the prompt title to InfoView properly and InfoView will stop and execute the prompt to get the info it needs before running the report.  Have you tried what you've posted originally to see if it executes without a problem?
    Thanks,
    John

  • How to pass field value from popup window to oninput processing of other pg

    Hi,
    I want to pass a field value from the popup window to oninput processing of main page ( from where popup window is triggered). and need to close the popup window. How to do it ?
    In the popup window's oninputprocessing, im doing some validation checks. If it passes all the validations, then only the control shd come to main page ..else it should stay in popup window only .
    Regards,
    Jothi.

    Hi Jothi,
    you can use java script to pass the value and close your popup window. use the following code.
    in your popup window:
    function passData(h1)
             window.opener.document.getElementById('var1').value = h1 ;
             window.close();
    then call this function when you finish your validations.
    in your main page layout create an input field with id as passed in the function above "var1".
    In the value attribute give it your variable as follow:
    <htmlb:inputField id      = "var1"
                              value   = "<%= var2 %>"
                              visible = "false" />
    "var2" will be assigned the value from your popup window.
    I hope this will help you..
    Regards,
    Husain

  • How to pass a value from a menu to a form

    I have a scenario where I'd like to take a value set in a menu and pass it to the form that refers that menu. Using a Global seem to work on one instance but not another. While I try to figure out the instance problem, has anybody else passed values from menus to forms without using a global variable?

    How would that work? I've tried by defining a package in the menu but how do I have the form refer to that value?
    I try to refer to the package item in the form like
    package_name.variable_name
    but the form does not know what that is.

  • How to pass query string from content editor webpart to another?

    Hi All,
    I am using content editor web-part to show GooglePiechart  for workflow status column in a list. When user click on chart, i need to show particular clicked area data in another list web-part. So that, i need to pass the query value from content editor
    web-part to another web-part. How to achieve this scenario?

    Hi Sam,
    What you can do is using SPD create a data view webpart which excepts query string value as filters as shown in the below article
    http://madanbhintade.wordpress.com/2012/01/08/sharepoint2010dataviewwebpart/
    http://sharepoint.stackexchange.com/questions/55184/how-to-filter-dataview-webpart-dvwp-from-query-string
    Then When you click on the pie charts particualr section perform a post back  by appending the required query string paramter to the same page on which your webpart exist
    Raghavendra Shanbhag | Blog: www.SharePointColumn.com
    Please click "Propose As Answer " if a post solves your problem or "Vote As Helpful" if a post has been useful to you.
    Disclaimer: This posting is provided "AS IS" with no warranties.

  • How to omit parameter values from exceptions thrown by the JDBC driver

    Is there a way to get the Oracle JDBC driver to omit the parameter values from the message when it throws an exception?
    We have an application that persists credit cards and when an exception is thrown by the driver, it's including the credit card number in the error message, which ultimately gets logged by the application. There are too many layers and locations, including OpenJPA, Spring, and our own application, where we'd have to massage the error data to remove that card number.
    For example, we get the following exception:
    Caused by: org.apache.renamed.openjpa.lib.jdbc.ReportingSQLException: ORA-20104: Permission denied
    ORA-06512: at "PROTEGRITY.PTY", line 57
    ORA-06512: at "PROTEGRITY.PTY", line 383
    ORA-06512: at "SUBSDSYS.TORDERPAYMENT_UPD", line 16
    ORA-04088: error during execution of trigger 'SUBSDSYS.TORDERPAYMENT_UPD'
    {prepstmnt 6603044
    UPDATE PAYMENT
         SET CARD_HOLDER_NAME = ?, CARD_TYPE = ?, EXPIRY_MONTH = ?, EXPIRY_YEAR = ?, GATEWAY = ?
         WHERE UIDPK = ?
    [params=(String) Test Test, (String) VISA, (String) 03, (String) 2012, (String) CREDITCARD, (long) 106901]} [code=20104, state=72000]
    at org.apache.renamed.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
    at org.apache.renamed.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(LoggingConnectionDecorator.java:57)
    The actual content of the message appears to come from the JDBC driver, not OpenJPA.
    This particular example doesn't show the card number, but only exposed that possibility as a risk.
    BTW: before you ask, for PCI compliance we're using a database layer service to encrypt the card numbers before they're stored in the table.
    Thanks much.

    [email protected] wrote:
    The actual content of the message appears to come from the JDBC driver, not OpenJPA.Wrong. This is a dump of parameters used to execute a query - and it comes from some upper layer, not the JDBC driver.
    I would start looking at the source code starting here:
    org.apache.renamed.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)

  • How to pass a value from inside a while loop outside the loop

    Hello to everybody, I have been searching through the forum but I have not found a certain answer for my problem. I would try to explain my problem as breefly as posible:
    I have to send by a BNC2120 two signals and acquire an other one thats comes from a preassure sensor. That part is done by introducing simulating and acquiring DAQmx inside while loops.It is sycronized by my self, proving such diferent values (is not the optimum, but is only the first prototype) and works as I expected. Well, then I want to sample some of the values of these signals, that is done with relays and local variables to get the value in the instant I want to sample. Here begin my problems: I want to extract the sample values out of the while loops without restarting them, I mean: I do not want to stop the while loops because the acquisition and the generation of the signal must be continuous, but I do not know if it is posible to put the while loops in "standby" until I operate with the values I have sampled and then the signal generator and the acquiere continues from when it has stoped before. Particulary I want to obtain the value of the top while loop (inside a case) when the counter arrives at 15.
    I have proved to do with local variables, global variables, making a state machine, with event cases, with flat secuences...I have been reading about and proving diferent posible solutions for this week and the whole past week and I have not found the solution.
    If any of you know how I can do this thing, I would be loved to listen your opinions. My proyect is above: 
    Thank you a lot in advance.
    Sinceresly,
    Miguel.
    Attachments:
    maq_estados_event_case.vi ‏239 KB

    It definately sounds like what you really want is a Producer/Consumer.  It is an architecture that uses Queues to pass data from a data generation loop (producter, your DAQ loop) and a data processor (consumer).
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to pass one value from method 1 to method 2 in BADI...

    Hello Experts,
    How do I pass a custom variable from lets say method 1 to method 2 in BADI? Do I need to
    enhance it? For example, I need to pass my flag variable which contains 'X' from method as exporting
    and importing in method 2.

    Hi,
    Yes declare a flag in first method and make it 'X' when you get the condition that you have made changes to item values and export it to memory id ...
    EXPORT GV_FLAG TO MEMORY ID 'SSS'.
    and in second method import the same...
    IMPORT GV_FLAG FROM MEMORY ID 'SSS'.
    and according to the value write the logic...
    Thanks,
    Shailaja Ainala.

  • How to pass null values From DTW

    I have update value of Acctntcode of OACT table
    Now i have to insert null in the field of Acctntcode From DTW (Data Transfer WorkBench)
    How Can i do it ?

    Hi,
    little late to the party on this one but I had a similar issue today and found the answer.
    Use a "/" (forward-slash) in your DTW file and it will set the field to NULL for you.
    I don't know if this works for numeric fields (probably not) but it worked for me on several string fields I needed to clear in various Master Data objects.
    HTH!
    Regards,
    Steve

Maybe you are looking for

  • Ahhhgh! Coventry 02476 s-l-o-w broadband 1mbps

    Yesterday I noticed my broadband was slow. It was down to 0.5 - 1.5mbps - it is normally about 16 mbps. I rang the helpline and they tested my line and said there was a network fault in the area after a fault at the exchange was  "resolved" on Saturd

  • Query for selecting the 4 highest marks of the student

    query for selecting the 4 highest marks of the student

  • Adding alert activity in OSB message flow urgent

    hi, i added an alert activity in my OSB proj message flow to monitor the process . after deploying the proj in console, i gave inputs. but i am not able to see the alert in operations>dashboard>pipeline alerts . no alert has been written in dashboard

  • SQ02 Changes

    Hello Experts, In query i made changes through SQ02 tcode. Actually I have added two fields in the query. Also I have generated the query My query is that when query is generated it did not ask for transport request. I have mannually added the change

  • Team calendar Error in Leave request Page .No Views found: Missing customiz

    Hi all i am portal consultant , i dont know much abt HR related configuration required for ESS. Plz Tell me the what configuration Exactly needed for Team calender in a leave Request page. in R3 i have been to the the Tabel   V_PTREQ_TEAM  where i fo