How can I pass a value from the datagrid to my textinput

Hi i am new in adobe flex!
I have only one row in my datagrid and it has 5 dataField. Those dataFields are id, ln, fn, kurs, yr. I want to pass those value into a textinput respectively.
Heres my code:
<mx:DataGrid x="396" y="10" width="110" height="124" id="dginfo" enabled="true" dataProvider="{studinfo.lastResult.datas.data}" creationComplete="studinfo.send()" editable="false" visible="true">
                        <mx:columns>
                            <mx:DataGridColumn headerText="C0" dataField="username" visible="false"/>
                            <mx:DataGridColumn headerText="C1" dataField="id"/>
                            <mx:DataGridColumn headerText="C2" dataField="ln"/>
                            <mx:DataGridColumn headerText="C3" dataField="fn"/>
                            <mx:DataGridColumn headerText="C4" dataField="kurs"/>
                            <mx:DataGridColumn headerText="C5" dataField="yr"/>
                        </mx:columns>
                    </mx:DataGrid>
I want to pass it here (code)
<mx:TextInput backgroundColor="#ABA5A5" editable="false" enabled="true" color="#000000" horizontalCenter="-50" verticalCenter="-71" id="idview" text="{data.id}"/>
                    <mx:TextInput  id = "idview" editable="false" enabled="true" text="{data.ln}"/>
                    <mx:TextInput  id="lnview"editable="false" enabled="true"text="{data.fn}"/>
                    <mx:TextInput id="fnview" editable="false" enabled="true" text="{data.kurs}"/>
                    <mx:TextInput backgroundColor="#ABA5A5" editable="false" enabled="true"  id="yrview" text="{data.yr}"/>
My problem is that this code won't work, it won't diplay anything...:D

it must not display anything as data.ln doesnot have any value. in your code, in the text property of textfield, data is considered as a property of your application, a dynamic object; so even it doesnot have ln property, it is not showing error, neither displaying anything.
do you mean to populate your textfields if the datagrid row is selected? if so:
<mx:TextInput  id = "idview" editable="false" enabled="true" text="{dginfo.selectedItem.ln}"/>
if you want to populate the same data without caring if it is selected in datagrid, you should not think like you are getting data from datagrid, instead, you are getting your values directly from the studinfo.lastResult
in such:
<mx:TextInput  id = "idview" editable="false" enabled="true" text="{studinfo.lastResult.datas.data.ln}"/>
note: if your result contains more than one data, you should treat it as array:
studinfo.lastResult.datas.data[0].ln

Similar Messages

  • How can I pass a value to the command prompt?

    I was wondering how can I pass a value to the command prompt with Windows and Linux? I'm more interested in Linux's system than Windows though. Is there a way to return info from the command prompt?

    Here is a snippet from http://mindprod.com/jglossexec.html that explains how in detail.
    Runtime.getRuntime().exec("myprog.exe") will spawn an external process that runs in parallel with the Java execution. In Windows 95/98/ME/NT/2000/XP, you must use an explicit *.exe or *.com extension on the parameter. It is also best to fully qualify those names so that the system executable search path is irrelevant, and so you don't pick up some stray program off the path with the same name.
    To run a *.BAT, *.CMD, *.html *.BTM or URL you must invoke the command processor with these as a parameter. These extensions are not first class executables in Windows. They are input data for the command processor. You must also invoke the command processor when you want to use the < > | piping options, Here's how, presuming you are not interested in looking at the output:
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat" );
    Runtime.getRuntime( ).exec ("cmd.exe /E:1900 /C MyCmd.cmd" );
    Runtime.getRuntime( ).exec ("C:\\4DOS601\\4DOS.COM /E:1900 /C MyBtm.btm" );
    Runtime.getRuntime( ).exec ("D:\\4NT301\\4NT.EXE /E:1900 /C MyBtm.btm" );
    There are also overloaded forms of exec(),
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null);
    Runtime.getRuntime( ).exec ("command.com /E:1900 /C MyBat.bat", null, "C:\\SomeDirectory");
    The second argument can be a String [], and can be used to set environment variables. In the second case, "C:\\SomeDirectory" specifies a directory for the process to start in. If, for instance, your process saves files to disk, then this form allows you to specify which directory they will be saved in.
    Windows and NT will let you feed a URL string to the command processor and it will find a browser, launch the browser, and render the page, e.g.
    Runtime.getRuntime( ).exec ("command.com http://mindprod.com/projects.html" );
    Another lower level approach that does not require extension associations to be quite as well set up is:
    Runtime.getRuntime( ).exec ("rundll32 url.dll,FileProtocolHandler http://mindprod.com/projects.html" );
    Note that a URL is not the same thing as a file name. You can point your browser at a local file with something like this: file://localhost/E:/mindprod/jgloss.html or file:///E|/mindprod/jgloss.html.
    Composing just the right platform-specific command to launch browser and feed it a URL to display can be frustrating. You can use the BrowserLauncher package to do that for you.
    Note that
    rundll32.exe url.dll,FileProtocolHandler file:///E|/mindprod/jgloss.html
    won't work on the command line because | is reserved as the piping operator, though it will work as an exec parameter passed directly to the rundll32.exe executable.
    With explicit extensions and appropriately set up associations in Windows 95/98/ME/NT/2000/XP you can often bypass the command processor and invoke the file directly, even *.bat.
    Similarly, for Unix/Linux you must spawn the program that can process the script, e.g. bash. However, you can run scripts directly with exec if you do two things:
    Start the script with #!bash or whatever the interpreter's name is.
    Mark the script file itself with the executable attribute.
    Alternatively start the script interpreter, e.g.
    Runtime.getRuntime( ).exec (new String[]{"/bin/sh", "-c", "echo $SHELL"}";

  • How can i pass parameter values from html to a shell script

    Hi Guys...
    I had a requirement where i need to execute a sql statement and print the output in HTML page. This report has parameters to enter. So i created a HTML form which accepts parameters. When the submit button is pressed, the action tag in the form invokes unix shell script file. It will open sqlplus and run the sql script file .sql and print the output in the HTML page.
    sql script contains the query and some set options which prints the output in HTML page. Like "SET MARKUP HTML ON"... The query has some parameters like "select * from emp where empno = &&empnumber. I will use the same name "empnumber" while created the HTML parameter form like " <input type = "text" name="empnumber" size="10" align="left">.
    user sees this parameter form and enters some value in to that empno text box.
    My question is how can i catch these parameter values in a shell script and pass it to the sql script to execute it.
    Help Appreciated
    Thanx

    This is a A Bad Idea (tm). This type of CGI processing is old and were (and still is) full of security holes. Very easy to inject stuff (Unix commands and SQL) into it.. To get those parameters into SQL*Plus requires using Unix shell commands to process it - and something like a backquote allows all kinds of nasty stuff to be injected. The Unix shell was never designed to be used as a secure CGI environment.
    There are far better and far superior alternatives. Perl (with Perl_DBI) and PHP (using Zend Core for Oracle) come to mind as web scripting languages.
    Even easier is using HTMLDB. Very few moving parts. Is free. Supports Oracle 9.2 and 10G.

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • How can I pass a value from Client to EntityImpl class?

    Hi everyone,
    I am using ADF BC to develop my Application.
    I want to do something in the EntityImpl class.
    My job needs a value from Client.
    I can't find any way to slove the problem.
    Is there anyone have an ideal, please tell me.
    Thanks,
    Tuan Vu Minh
    FPT Software Solution Company (Oracle partner)
    FPT Coporation
    Add: 3th Fl., 51 Le Dai Hanh Builiding,
    Hai Ba Trung Dist,
    Hanoi,
    The Socialist Republic of VietNam
    Tel: (84,4) 9745476
    Fax: (84,4) 9754475
    Email: [email protected]
    Website: http://www.fss.com.vn , http://www.fpt.com.vn

    Firstly, let me state that I'm not a Swing programmer, so your mileage may vary. However I don't think a Swing solution is what you need. ADF BC will do this for you.
    Assumptions on my answer:
    1) You're generating the log_id from a database sequence and it is automatically populated in the UserLog table.
    2) You have 2 VOs, namely UserLogView and ActionLogView based on the EOs.
    Create a View Link between each VO making UserLogView the master.
    In your UI, once the user has inserted into UserLogView, include a bound create button for the ActionLogView such that it creates an associated ActionLogView record for the user when they wish to enter the log details. ADF BC will populate the ActionLogView Log_id with the parent's UserLogView log_id automatically. You'll then need to navigate to the ActionLogView screen to allow the user to enter the rest of the details.
    As such, you don't need to expose the log_id to the client, ADF BC will take care of the population of the log_id correctly for you when creating the detail record.
    Another approach may be to define one VO encompassing both EOs, where the ActionLog is a reference. Look at the JDevelope help page "View Object Wizard - Entity Objects Page", specifically at the "Reference" section for more info. You'll need to test out the updateable flag for both EOs defined within the VO to ensure you can update the values of both.
    Test this out in the Business Components Browser before writing the UI to see if the ADF BC solution works, and saving you time in writing the UI.
    Hope this helps.
    CM.

  • How can I pass a value from one application to another through URL

    I am passing a value APP_USER from one application to another application (item is P_ASK_U) through navigation bar entrees URL.
    This is working with in the application..(javascript:popupURL('f?p=&APP_ID.:165:&SESSION.::&DEBUG.::P_ASK_U:#&APP_USER.#') )
    This one is not passing the value, eventhough it open the application..
    javascript:popupURL('http://htmldb.oracle.com/pls/otn/f?p=35129:1:::P_ASK_U:&APP_USER.');
    Is there any syntax error or is it not possible, please let me know..
    Thanks
    Venu

    Hi Scott,
    You are right, the first one do not need # character.
    In the Doc it is mentioned as....
    Pass the value on a URL reference using f?p syntax. For example:
    f?p=100:101:10636547268728380919::NO::MY_ITEM:ABC
    I am using the following URL, it pops up the external application, but it is not passing the APP_USER value to the page item of that application.
    javascript:popupURL('http://htmldb.oracle.com/pls/otn/f?p=35129:1::P_ASK_U:&APP_USER.');
    sorry I still do not know what I am missing..
    Thanks
    Venu

  • How can I pass field value betwen view in ICWC?

    Hi experts,
    I am new to this BSP programming. I have some requirements to modify standard ICWC in CRM 5.0
    Hope can get some advices and helps here.
    I have added a new field called <status> to context note SEARCHCUSTOMER in BupaSearchB2B view and also the same field name to context note CUSTOMER in BupaCreate view.
    I have added the field into both the HTM views and able to execute thru WebClient. However, I have one problem in passing the <status> value from BupaSearchB2B view  to the BupaCreate view when I click on the 'create' button.
    I do search and saw this thread How can I pass field value beetwen view in IC Web Client? , but i cant figure out how it works.
    Do I need to create the field <status> to context note CUSTOMER in BupaSearchB2B? Currently the context note does not have any attributes.
    Really appreciate for any help.
    Edited by: mervyn tay on Apr 7, 2009 11:42 AM

    solved by myself...
    code in the CREATE_ACCOUNT method.
            ev_entity->set_property( iv_attr_name = 'ZZICNO'
                                     iv_value = lv_icnum1 ).

  • How can i pass calculated value to internal table

    Hi
    i have to pass calculated value into internal table
    below field are coming from database view and i' m passing view data into iznew1
    fields of iznew1
                 LIFNR  LIKE EKKO-LIFNR,
                 EBELN  LIKE EKKO-EBELN,
                 VGABE  LIKE EKBE-VGABE,
                 EBELP  LIKE EKBE-EBELP,
                 BELNR  LIKE EKBE-BELNR,
                 MATNR  LIKE EKPO-MATNR,
                 TXZ01  LIKE EKPO-TXZ01,
            PS_PSP_PNR  LIKE EKKN-PS_PSP_PNR,
                 KOSTL  LIKE EKKN-KOSTL,
                 NAME1  LIKE LFA1-NAME1,
                 NAME2  LIKE LFA1-NAME2,
                 WERKS  LIKE EKPO-WERKS,
                 NETWR  LIKE EKPO-NETWR,
                 KNUMV  LIKE EKKO-KNUMV,
                 GJAHR  LIKE EKBE-GJAHR,
    and now i want to pass
    one field ED1  which i has calculated separatly and i want to pass this value into iznew1
    but error is coming that iznew1 is a table with out header line  has no component like ED1.
    so how can i pass calculated value to internal table iznew1,

    When you declare your internal table , make an addtion occurs 0
    eg . data : begin of iznew occurs 0 ,
                    fields ...
       add the field here ed1.
               end of iznew.
    now when you are calculating the value of ed1,
    you can pass the corresponding value of  ed1 and modify table iznew.
    eg
    loop at iznew.
    iznew-ed1 = ed1.
    modify iznew.
    endloop.

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • How do I pass input values from a html page to a jsf page

    hi,
    In my project,for front view we have used html pages.how can I get input values from that html page into my jsf page.for back end purpose we have used EJB3.0
    how can I write jsf managed bean for accessing these entities.we have used session facade design pattern and the IDE is netbeans5.5.
    pls,help me,very urgent
    thanx in advance

    Simplest way is to rewrite html page into jsf page.
    You can use session bean in your managed bean like this:
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class ManagedBean {
    private Context  ctx;
    private Object res;
    // session bean interface
    private Service service;
              public ManagedBean() {
                try{
                     ctx = new InitialContext();
                     res = ctx.lookup("Service");
                     service = (Service) res;
               catch(Exeption e){
    }Message was edited by:
    m00dy

  • How can I pass a value into a page fragment?

    How can I pass a value into a page fragment?
    I am implementing four search screens. And the only thing different about them will be their backing bean.
    So I’d like to do something like have four pages, each which retrieves its appropriate backing bean, sets that bean to a variable, and then includes a page fragment which contains the generic search page code (which will make use of that variable).
    The code in the four pages would be something like this:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:c="http://java.sun.com/jsp/jstl/core">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <c:set var="searchPageBackingBean"
    value="#{pageFlowScope.employeeSearchPageBean}"
    scope="page"/>
    <jsp:include page="./SearchPageBody.jsff"/>
    </jsp:root>
    At this point, what I’m seeing is that the fragment page, SearchPageBody.jsff, has no visibility of the searchPageBackingBean variable, either referencing it as #{pageFlowScope.searchPageBackingBean} or just #{searchPageBackingBean}

    The following will work, assuming you are needing to access a managed bean:
    Put this in the parent page:
    <c:set var="nameOfSearchPageBackingBean"
    value="employeeSearchPageBean"
    scope="request"/>
    Put this in the child, SearchPageBody.jsff:
    <c:set var="searchPageBean"
    value="#{pageFlowScope[nameOfSearchPageBackingBean]}"
    scope="page"/>

  • In Drop Down by Index how can i pass default value Dynamically

    Hi Friends,
    In Drop Down by Index how can i pass default value Dynamically.Please help me.
    Thanks in advance.
    Regards,
    Kumar.

    hi,
    if you want the value to be defaulted only the first time you execute the program then write the code which suman has mentioned in the views method
    wddoinit.
    Regards
    Sajid

  • How can I pass environment variables to the child process?

    How can I pass environment variables to the child process? This is what I tried and it didn't work.
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("The value of custom.property is : " + System.getProperty("custom.property"));
         }and the result is:
    The value of custom.property is : null

    Complete test:
         static public void main (String[] args) throws Exception {
              ProcessBuilder b = new ProcessBuilder("java", "-Dcustom.property=my property value", "-cp", ".", "Child");
              Map<String, String> map = b.environment();
              map.put("custom.property", "my environment value");
                 b.redirectErrorStream(true);
              Process p = b.start();
              BufferedReader reader = new BufferedReader (new InputStreamReader(p.getInputStream()));
              String line = null;
              while (null != (line = reader.readLine())) {
                   System.out.println(line);
         public static void main(String[] args) {
              System.out.println("Property value of custom.property is : " + System.getProperty("custom.property"));
              System.out.println("Environment value of custom.property is : " + System.getenv("custom.property"));          
         }

  • Urgent: How to exclude a particular value from the selection in the infopac

    How to exclude a particular value from the selection in the infopackage.
    Ex: not load for cost center 10000
    Thank you,
    sam

    Hi Sam,
    You cannot do this directly as exclusion, but you can include all other values, even as ranges and thus exclude the particular value, else you can also try to do this by writing a routine.
    Hope this helps...

  • How can I get one value from local machine registry

    how can I get one value from local machine registry, I would like read one value of regitry. I have windows NT workstation. I need it to find the full path of iexplore.exe, this value is in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE'
    Thanks.

    You can use the D2KWUTIL.pll library to read/write to the registry. You have to install the forms examples to get the library.
    The library d2kwut32.dll must also be installed at the clients.

Maybe you are looking for

  • Where can I find a tutorial for garage band?

    I would like to learn the basics and go from there.

  • Loadjava error - loading JAR file

    Hi, I am trying to load a JAR file into the DB and am getting these errors: $ loadjava -force -user user/pass javaTelnet.jar Error while creating class javaTelnet/ScriptHandler     ORA-29537: class or resource cannot be created or dropped directly Er

  • XL reporter error occurred while executing report! Rows: 25203 Columns: 30

    An error occurred while executing report! Rows: 25203 Columns: 30 Unspecified error One user gets this error when trying to run a custom XL report. It works for other users(on different PCs). The user can run other XL reports successfully.

  • Control break behavior

    Hi, Can anyone tell if there's a way to override the default behavior of Control Break? In my report (a schedule), I have a column that holds the values for days (monday, tuesday, etc.). I want to control break on that column but keep the resulting g

  • Satellite A100-773 - How to install Ethernet Controller driver?

    Hi i reinstalled Win Xp Prof on my Satelite A100-773 (PSAA9E) and have a problem with the Ethernet Controller. In the device manager the controller is marked with a yellow '?'. I use this driver http://de.computers.toshiba-europe.com/innovation/downl