How to retrieve the values from a Transient View Object

Hi Experts,
I am using Jdevelpoer11.1.1.5.0. I created one Transient view object with attributes EmpId,Salary.
In Backing Bean i will create rows for that view object and display it in the form of <af:Table> like Empid, Salary and an Update Link.
Now my problem is i want to update the salary of the particular EmpId. For Example if the EmpId is 100 and salary is 10000 now i want to increase the salary to 20000 and if i click on the update button; i want to retrieve the particular employee details in my backing bean. How can i acheive this?
Thanks in advance.

A better approach would be to programmatically populate rows in the <VO>Impl.java by overriding the executeQueryForCollection(0 as specified here -
http://adfpractice-fedor.blogspot.in/2011/01/adf-bc-programmatically-populated-vo.html
You can write the logic to update the salary in an AM method then on click of Update or in the getter of Salry field if logic is valid for all fields...

Similar Messages

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • How to retrieve the values from PL/SQL table types.

    Hi Every one,
    I have the following procedure:
    DECLARE
    TYPE t1 IS TABLE OF emp%ROWTYPE
    INDEX BY BINARY_INTEGER;
    t t1;
    BEGIN
    SELECT *
    BULK COLLECT INTO t
    FROM emp;
    END;
    This procedure works perfectly fine to store the rows of employee in a table type. I am not able to retrieve the values from Pl/SQL table and display it using dbms_output.put_line command.
    Can anybody help me please!!!!!
    Thanks
    Ahmed.

    You mean, you can't add this
    for i in t.first..t.last loop
    dbms_output.put_line(t(i).empno||' '||t(i).ename||' '||t(i).job);
    end loop;or you can't add this
    set serveroutput onor maybe, you are working in third party application where dbms_output is not applicable at all?
    You see, not able like very similar it is not working - both are too vague...
    Best regards
    Maxim

  • How to retrieve the values from a LinkedList

    Hello,
    I have just put this question in java programming forums by mistake...I think that it should be here ...
    I have created a LinkedList to store the results of a query to a database.
    These reasults are decimal numbers and then I want to sum all these numbers to be able to make the average.
    But when I try to retrieve the values of the Linked List I always receive an incopatible types error..
    Here is an extract of my code in a jsp page.
    LinkedList Average = new LinkedList();
    String Media = rst.getString(10);
    Average.add(Media);
    int Size = Average.size();
    double Sum = 0.0;
    for (int i=0; i<=Size; i++)
                    double Result = Average.get(i)     
                  Sum = Sum + Result;
    }If I try to retrieve the value of only one node from the list , I can just putting <%=Average.get(i)%>...but..how can I retrieve all the values (they are decimal numbers) to be able to add them?

    If you want to sum all the values, is there any reason you just don't retrieve the sum from the database rather than the list of values?
    anyway
    List average = new LinkedList();
    while (rst.next()){
      // retrieve the number:
      String mediaString = rst.getString(10);
      Double media = Double.valueOf(mediaString);
      // or maybe like this if it is a number in the database
      Double media = new Double(rst.getDouble(10));
      average.add(media);
    doubleSum = 0.0;
    for (Iterator it = average.iterator(); it.hasNext(); ){
      Double result= (Double) it.next();
      doubleSum += result.doubleValue();
    }

  • How will read the value from Adobe Reader/Viewer in c# windows App

    I m using VS2005 . working in windows appliction. i am using adobe Reader 9, Then the new pdf document open  inside the Acrobat adobe reader , Exsiting PDF file is created by Adobe Forms(Adobe LiveCycle designer and Adobe pro 9).
    Using the Class is:
    1.AcroExch.App
    2.AcroExch.AVDoc
    3.AcroExch.pdDoc
    4.Acrobat.CAcroApp
    namespace is:
    using AxAcroPDFLib;
    using AFORMAUTLib;
    using Acrobat;
    Using DLL is:
    1. Interop.Acrobat
    2. Interop.AcroPDFLib
    3. Interop.AFORMAUTLib
    4. AxInterop.AcroPDFLib
    My problem is,
    I am Working in
                       PDFis open inside the adobe reader/Viewer, but i can not able to get the value from PDF Forms.
                        ( This Pdf forms is Some more Control Design is Available)
    Ex:
    I have Attached my Pdf  disgn file.        Please see this Pdf file.
    I am not able to get the value from  inside window(adobe Reader/Viewer),  but i can able to get the value from the out side of adobe viewer/Reader.
    This coding not working properly,
    try
                    CAcroAVDoc AcroExchAVDoc = default(CAcroAVDoc);
                    CAcroApp AcroExchApp = default(CAcroApp);
                    CAcroPDDoc oDoc = default(CAcroPDDoc);
                    AFORMAUTLib.AFormApp AFormAut = default(AFORMAUTLib.AFormApp);
                    AFORMAUTLib.Field Field = default(AFORMAUTLib.Field);
                    AFORMAUTLib.Fields Fields = default(AFORMAUTLib.Fields);
                    bool OK = false;
                    AcroExchApp = new AcroApp();
                    oDoc = new AcroPDDoc();
                    AcroExchAVDoc = new AcroAVDoc();
                    AFormAut = new AFormAppClass();
                    //AcroExchApp = (Acrobat.AcroApp)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.App" ));
                    //oDoc = (Acrobat.AcroPDDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.PD Doc"));
                    //AcroExchAVDoc = (Acrobat.AcroAVDoc)Activator.CreateInstance(Type.GetTypeFromProgID("AcroExch.AV Doc"));
                    //AFormAut = (AFORMAUTLib.AFormApp)Activator.CreateInstance(Type.GetTypeFromProgID("AFormAut .App"));
                    bool bOK = AcroExchAVDoc.Open(pdfWindowLeft.src, "Temp"); ' some time not true
                        ' if  ok (true) then
                    if (bOK)
                        Fields = (AFORMAUTLib.Fields)AFormAut.Fields;
                        foreach (Field myField in Fields)
                            if (myField.Name == "form1[0].#subform[0].Id[0]")   ' field value not get from the inside window
                                string Id = myField.Value; ' not getting a answare
                            if (myField.Name == "form1[0].#subform[0].PatientName[0]")
                                string PatientName = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].Email[0]")
                                string Email = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].PhoneNo[0]")
                                string PhoneNo = myField.Value;
                            if (myField.Name == "form1[0].#subform[0].Address[0]")
                                string Address = myField.Value;
                catch (Exception Ex)
                    lbl_Result.Text = Ex.Message;
                finally
                    Conn.Close();
    This coding is working properly,
    try
                    String FORM_NAME = addressLeft.Text;
                    //String FORM_NAME = Application.StartupPath + "\\..\\..\\..\\..\\..\\TestFiles\\SampleForm.pdf";
                    // Initialize Acrobat by cretaing App object.
                    CAcroApp acroApp = new AcroAppClass();
                    // Show Acrobat Viewer
                    acroApp.Show();
                    // Create an AVDoc object
                    CAcroAVDoc avDoc = new AcroAVDocClass();
                    // Open the pdf
                    if (!avDoc.Open(FORM_NAME, ""))
                        lbl_Result.Text = "Cannot open" + FORM_NAME + ".\n";
                        return;
                    // Create a IAFormApp object, so that we can access the form fields in
                    // the open document
                    IAFormApp formApp = new AFormAppClass();
                    // Get the IFields object associated with the form
                    IFields myFields = (IFields)formApp.Fields;
                    // Get the IEnumerator object for myFields
                    IEnumerator myEnumerator = myFields.GetEnumerator();
                    bool bFound = false;
                    // Fill the "Name" field with value "John Doe"
                    while (myEnumerator.MoveNext())
                        // Get the IField object
                        IField myField = (IField)myEnumerator.Current;
                        // If the field is "Name", set it's value to "John Doe"
                        // form1[0].#subform[0].Name[0]
                        if (myField.Name == "form1[0].PatientInformation[0].Id[0]")
                            //form1[0].#subform[0].Id[0]
                            bFound = true;
                            lbl_id.Text = myField.Value;
                        //form1[0].#subform[0].Name[0]
                        if (myField.Name == "form1[0].PatientInformation[0].PatientName[0]")
                            bFound = true;
                            lbl_name.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].Email[0]")
                            bFound = true;
                            lbl_email.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].PhoneNo[0]")
                            bFound = true;
                            lbl_phoneno.Text = myField.Value;
                        if (myField.Name == "form1[0].PatientInformation[0].Address[0]")
                            bFound = true;
                            lbl_address.Text = myField.Value;
    can u anyone help me. It's very urgent for my project.
    Thanks for ur replay,
    Regards
    Ganesaselvam.I

    First off - the code you wrote won't work with Reader, it will only work with Adobe Acrobat.
    Second, LiveCycle Designer-based forms are a special type of PDF and don't use AcroForms, they use an XML-based forms grammar.  Therefore, the AcroForms API calls aren't designed to work with them.  You should be using the JSObject bridge code along with JavaScript to access the values of the fields.

  • How to bind the value of textbox with View object's bind variable?

    Hi all,
    In my use case I need to pass the value of textbox in the jsf page to the View Object's bind variable.
    I should not hard code this in my backing bean. I need to configure in the Jdeveloper itself.
    I am using Jdeveloper 11.1.1.4.0 version. Kindly come up with your help.
    Thanks,
    Phani.

    Hi,
    You have to use Named Bind Variables(ExecuteWithParams)
    http://download.oracle.com/docs/cd/B31017_01/web.1013/b25947/web_search_bc004.htm
    http://www.cloudsolid.com/2008/10/using-named-bind-variables.html

  • How to get the values from the resultset???

    I have a problem with this code given below,
    i am executing an sql query which return a union of values from two tables.
    the problem here is how do i read the values from the resultset.
    here is the code....
    package com.webserver;
    import java.sql.*;
    public class UnionDemo{
    public static void main(String args[]){
    Connection connection =null;
    Statement statement =null;
    ResultSet rs =null;
    try{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    connection = DriverManager.getConnection("jdbc:oracle:thin:@:1521:ORCL","scott","tiger");
    statement = con.createStatement();
    rs = statement.executeQuery("(select tablename from node where appid=432) union (select tablename from uomnode where appid=432)");
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    while (rs.next()){
    System.out.println(rs.getString(1));
    // instead of rs.getString(1) I also used rs.getString("tablename") but of no success....
    }//end of while
    }catch(Exception exp){
    exp.printStackTrace();
    finally{
    try{
    if (rs!=null) rs.close();
    if (statement!=null) statement.close();
    if (con!=null) con.close();
    }catch(Exception exp1){
    exp1.printStackTrace();
    }//end of finally
    }//end of main
    }//end of class
    when i execute this program i get an oracle error ORA-01009
    which says (java.sql.SQLException: ORA-01009: missing mandatory parameter)
    can anyone help to retrieve the values from this resultset...
    thanx

    [cut]
    i am executing an sql query which return a union of
    values from two tables.
    the problem here is how do i read the values from the
    resultset.[cut]
    When the error occours?
    1) Executing query ?
    2) Retrieving the field from the resultSet ?
    3) ecc. ?
    BTW, first of all, try to execute the query removing the parenthesis
    of the two select statement. I know that there are some problem
    with the oracle jdbc driver about them.
    Hope it helps.

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • How to retrieve the data from SAP-BAPI by using VB Code

    Hi ,
    I am new to BAPI.
    V have created an application in Visual Basic with the following fields
    EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
    We have written the code for SAVING the data into SAP. Already we have
    constructed a table with the respective fields in SAP.
    For that we ourself created our own BAPI Structure / Function Group /
    Function Module/ Business Object - RELEASED related elements.
    1)Established the connection successfully.
    2)Stored the data into SAP Successfully and v r in need of
    3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
    Following is the code :
    'BAPI Structure  : ZBAPIEMP
    'Function Group  : ZBAPIEMP
    'Function Module : ZBAPI_EMP_CREATEFROMDATA
    'Business Object : ZBAPIEMP
    'Function Module : ZBAPI_EMP_GETLIST
    Dim bapictrl As Object
    Dim oconnection As Object
    Dim boEmp As Object
    Dim oZEmp_Header As Object
    Dim oImpStruct As Object
    Dim oExpStruct As Object
    Dim oreturn As Object
    Dim x As String
    Private Sub Form_Load()
    Set bapictrl = CreateObject("SAP.BAPI.1")
    Set oconnection = bapictrl.Connection
    oconnection.logon
    Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
    Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
    Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
    End Sub
    Private Sub cmdSave_Click()
        oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
        oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
        oZEmp_Header.Value("ADDR1") = txtAddr1.Text
        oZEmp_Header.Value("ADDR2") = txtAddr2.Text
        oZEmp_Header.Value("CITY") = txtCity.Text
        oZEmp_Header.Value("PHONE") = txtPhone.Text
        boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
        x = oreturn.Value("Message")
        If x = "" Then
            MsgBox "Transaction Completed!..."
        Else
            MsgBox x
        End If
    End Sub
    Private Sub cmdView_Click()
    End Sub
    COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.

    I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
    -Tim
    Option Compare Database
    Dim SAPLOGIN As Boolean
    Dim FunctionCtrl As Object
    Dim SapConnection As Object
    Sub SAPLOGOUT()
    On Error GoTo LogoutFehler
        SapConnection.logoff
        SAPLOGIN = False
    Exit Sub
    LogoutFehler:
        If Err.Number = 91 Then
            Exit Sub
        Else
            MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
        End If
    End Sub
    Function SAPLOG() As Boolean
    'Verbindungsobjekt setzen (Property von FunctionCtrl)
       Set FunctionCtrl = CreateObject("SAP.Functions")
       Set SapConnection = FunctionCtrl.Connection
    'Logon mit Initialwerten
       SapConnection.Client = "010"
       SapConnection.Language = "EN"
       SapConnection.System = "PR1"
       SapConnection.SystemNumber = "00"
       'SapConnection.Password = ""
       SapConnection.GroupName = "PR1"
       SapConnection.HostName = "168.9.25.120"
       SapConnection.MessageServer = "168.9.25.120"
         If SapConnection.Logon(0, False) <> True Then  'Logon mit Dialog
             Set SapConnection = Nothing
             DoCmd.Hourglass False
             MsgBox "No connection to SAP R/3 !"
             SAPLOGIN = False
             SAPLOG = False
             Exit Function
          End If
        SAPLOG = True
    End Function
    Function MatDescr(MatNr As String)
    Dim func1 As Object
    Dim row As Object, X As Integer, ErsteNr As String
    Dim DatensatzZähler As Long
    Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
        If Not SAPLOGIN Then
            If Not SAPLOG() Then
                MsgBox "No connection  to SAP !", 16
                SAPLOGOUT
                Exit Function
            End If
        End If
    ' Instanziieren des Function-Objektes
    Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
    ' Export-Paramter definieren
    func1.exports("MATNR") = MatNr
    func1.exports("SPRAS") = "EN"
    DoEvents
    If Not func1.call Then
        If func1.exception <> "" Then
            MsgBox "Communication Error with RFC " & func1.exception
        End If
        DoCmd.Hourglass False
        SAPLOGOUT
        Exit Function
    Else
      MatDescr = func1.imports("MAKTX")
    End If
    If MatDescr = "" Then
        MatDescr = "PART NO. NOT FOUND"
    End If
    End Function

  • How to retrieve the value of last identity has been updated in a database?

    how to retrieve the value of last identity has been updated in a database

    Hi,
    Oracle 10g, FGA - Fine grained auditing, supports DML statements (9i only select).
    Set up FGA using the DBMS_FGA.ADD_POLICY procudure:
    sql> BEGIN
    DBMS_FGA.ADD_POLICY (
    policy_name => 'AUD_EMPLOYEE_SAL',
    object_schema => 'HR',
    object_name => 'EMPLOYEE',
    audit_column => SALARY',
    audit_condition => '',
    statement_type => 'UPDATE');
    END;
    NEXT:
    sql> SELECT dbuid, lsqltesxt FROM sys.fga_logs$;
    The database inserts the audit record into the FGA_LOG$ table using an autonomous transaction; even if you roll back the update statement, the update action will still be logged in this table. The fga_log$ tracks the session, machine id, timestamp, schema, scn, etc:
    SQL> desc fga_log$
    Name Null? Type
    SESSIONID NOT NULL NUMBER
    TIMESTAMP# DATE
    DBUID VARCHAR2(30)
    OSUID VARCHAR2(255)
    OSHST VARCHAR2(128)
    CLIENTID VARCHAR2(64)
    EXTID VARCHAR2(4000)
    OBJ$SCHEMA VARCHAR2(30)
    OBJ$NAME VARCHAR2(128)
    POLICYNAME VARCHAR2(30)
    SCN NUMBER
    SQLTEXT VARCHAR2(4000)
    LSQLTEXT CLOB
    SQLBIND VARCHAR2(4000)
    COMMENT$TEXT VARCHAR2(4000)
    PLHOL LONG
    STMT_TYPE NUMBER
    NTIMESTAMP# TIMESTAMP(6)
    PROXY$SID NUMBER
    USER$GUID VARCHAR2(32)
    INSTANCE# NUMBER
    PROCESS# VARCHAR2(16)
    XID RAW(8)
    AUDITID VARCHAR2(64)
    STATEMENT NUMBER
    ENTRYID NUMBER
    DBID NUMBER
    LSQLBIND CLOB
    SQL> spool off

  • How do retrieve the contents from a DataTable?

    I have a DataTable filled with the contents of an Excel spreadsheet. 
        DataTable dtDataTable = new DataTable();
        using (OleDbDataAdapter oledbAdapter = new OleDbDataAdapter(oledbCmd))
            oledbAdapter.Fill(dtDataTable);
    How do retrieve the contents from the DataTable? ... one value at a time (for example row 3, column 5).
    bhs67

    This works:           
        string stData = dtDataTable.Rows[3].ItemArray[5].ToString();
    bhs67

  • How to get the values from popup window to mainwindow

    HI all,
       I want to get the details from popup window.
          i have three input fields and one search button in my main window. when i click search button it should display popup window.whenever i click on selected row of the popup window table ,values should be visible in my main window input fields.(normal tables)
       now i am able to display popup window with values.How to get the values from popup window now.
       I can anybody explain me clearly.
    Thanks&Regards
    kranthi

    Hi Kranthi,
    Every webdynpro component has a global controller called the component controller which is visible to all other controllers within the component.So whenever you want to share some data in between 2 different views you can just make it a point to use the component controller's context for the same. For your requirement (within your popups view context) you will have have to copy the component controllers context to your view. You then will have to (programmatically) fill this context with your desired data in this popup view. You can then be able to read this context from whichever view you want. I hope that this would have made it clear for you. Am also giving you an [example|http://****************/Tutorials/WebDynproABAP/Modalbox/page1.htm] which you can go through which would give you a perfect understanding of all this. In this example the user has an input field in the main view. The user enters a customer number & presses on a pushbutton. The corresponding sales orders are then displayed in a popup window for the user. The user can then select any sales order & press on a button in the popup. These values would then get copied to the table in the main view.
    Regards,
    Uday

  • How to get the value from a JavaScript and send the same to Java file?

    Hi.
    How to get the value from a JavaScript (this JS is called when an action invoked) and send the value from the JS to a Java file?
    Thanks and regards,
    Leslie V

    Yes, I am trying with web application.
    In the below code, a variable 'message' carries the needed info. I would like to send this 'message' variable with the 'request'.
    How to send this 'message' with and to the 'request'?
    Thanks for the help :-)
    The actual JS code is:
    function productdeselection()
    var i=0;
    var j=0;
    var deselectedproduct = new Array(5);
    var message = "Are you sure to delete Product ";
    mvi=document.forms[0].MVI;
    mei=document.forms[0].MEI;
    lpi=document.forms[0].LPI;
    if(null != mvi)
    ++i;
    if(null != mei )
    ++i;
    if(null != lpi)
    ++i;
    if(null != mvi && mvi.checked)
    deselectedproduct[++j]="MVI?";
    if(null != mei && mei.checked)
    deselectedproduct[++j]="GAP?";
    if(null != lpi && lpi.checked)
    deselectedproduct[++j]="LPI?";
    if( 0!=j)
    if(i!=j)
    for (x=0; x<deselectedproduct.length; x++)
    if(null != deselectedproduct[x])
    message =message+ "-" +deselectedproduct[x];
    alert(message);
    else
    //alert(" You cannot remove all products!");
    return false;
    return true;
    }

  • How to get the value from databank

    Hi,
    How to get the value from databank? and how to set the same value to visual script object?
    thanks,
    ra

    Hi,
    You can use GetDatabankValue(HeaderName, Value) to get the value from databank and SetDataBankValue(HeaderName, Value) to set the value to databank.
    You can refer to the API Reference to see list of associated functions and techniques we can use with related to Data Bank.
    This is the for OFT but if you are using Open Script then you have direct access for getting the databank value but when it comes to setting a value you have to use File operation and write you own methods to do the set operation.
    Thanks
    Edited by: Openscript User 100 on Nov 13, 2009 7:01 AM

  • How to get the values from html:select? tag..?

    i tried with this, but its not working...
    <html:select styleClass="text" name="querydefs" property="shortcut"
                 onchange="retrieveOptions()" styleId="firstBox" indexed="true">
    <html:options collection="advanced.choices" property="shortcut" labelProperty="label" />
    </html:select>
                        <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>

    <td align="left" class="rowcolor1">
                        <script language="javascript" type="text/javascript">
                              function retrieveOptions(){
                             var sel = document.querydefs.options;
                             var selectedOption = sel[sel.selectedIndex].value;
                             document.write(selectedOption);
                           </script>This java script is not working at all..its not printing anything in document.write();
    This is code..
    <td class="rowcolor1" width="20%">
    <html:select styleClass="text" name="querydefs" property="shortcut"
                             onchange="retrieveSecondOptions()" styleId="firstBox"
                             indexed="true">
                             <html:options collection="advanced.choices" property="shortcut"
                                  labelProperty="label"  />
                        </html:select>i tried with this also. but no use..i'm not the getting the seleced option...
    function retrieveOptions(){
    firstBox = document.getElementById('firstBox');
                             if(firstBox.selectedIndex==0){
          return;
        selectedOption = firstBox.options[firstBox.selectedIndex].value;
    }actually , how to get the values from <html:select> ...?
    my idea is to know which value is selected from the combo box(<html:select> ) if that value is equal some string i have enable a hyperlink to open a popup window

Maybe you are looking for

  • How to search users in Outlook Using Last Name and First Name

    During recent times we change the naming convention in AD, FirstName , LastName We can search users using More Columns but I would like to know alternate method to search users. The search result should sort results by last name as query Regards Chen

  • Problems with my Airport Snow. Please someone help!

    I had an airport snow base station for a couple of years. I bought it used, and after some initial difficulty, I manage to set it up and it worked fine for a little while. At some point it started failing to connect and started giving me a message th

  • Calling JSP bean function on button OnClick

    Hi- A NewBie question.... I have a .jsp page and supporting .java bean. I registed the bean in .jsp page using <jsp:useBean ...> I want to fire a function defined in that bean on the click of a button which is defined in the .jsp page So I am doing s

  • Flash won't install- any ideas?

    I am trying to install Flash 11 on my Windows 7 system using IE 9.  I had an existing Flash 10.  I uninstalled Flash 10.  My installation times out at 12%. I have disabled my firewall and virus software.  Still quits at 12%.

  • Opening old PPro 2.0 projects in CS5

    I have been using PPro2.0 for the last 4 years.  I recently installed PPro CS5 (As a part of CS5 Production Premium).  I have many templates I have created for my videos, which I created with PPro 2.0.  Will I have any issues opening these projects i