How to get the class from selected row in af:table

I know that you can get individual selcted row values from an af:table using getRow().getAttribute("attName").
But, can I obtain the class that the table iterator used to populate the table?
For instance, a table lists the result of an employee search that was bound to a session bean method returning List<Employee>.
After selecting the employee of interest and clicking a command button I want to access that instance of the Employee class to pass onto the session bean to do some stuff.
I don't want to hit the database to do it either (via a query on a key value for example) - the search iterator has already retrieved it, I just want to access it and do something with it.
Possible?
Thanks.

Hi,
if you use ADF try iterator.getCurrentRow().getDataProvider() on the binding container. If you use ADF Faces without then the Row object is the instance of your class
Frank

Similar Messages

  • How to get the data from multiple nodes to one table

    Hi All,
    How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained
    Regards,
    Indra

    HI Indra,
    From Node A, get the values of the attributes as
    lo_NodeA->GET_STATIC_ATTRIBUTES(  IMPORTING STATIC_ATTRIBUTES = ls_attributesA  ).
    Similarily get all the node values from B, C, D and E.
    Finally append all your ls records to the table.
    Hope you are clear.
    BR,
    RAM.

  • How to get the data from pcl2 cluster for TCRT table.

    Hi frndz,
    How to get the data from pcl2 cluster for tcrt table for us payroll.
    Thanks in advance.
    Harisumanth.Ch

    PL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
    ~Suresh

  • 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 get the data from multiple tabes into single table

    hi all,
    here i am having 10 data base tables,how to get the data into a single table.
    regards,
    subba reddy

    hi,
    non XI/PI related
    Regards,
    Michal Krawczyk

  • How to get the value from select tag

    I am trying to do the exactly same thing as this select Demo does. I can not find out a way to get the value form the first select menu and use it to get all the values to form the second select menu.
    here is the web: http://www.4al.pl/phpAjaxTags/ . I am trying to do the same thing as the first demo shows!
    Here is part of my code:
            <!-->create the database connection <-->
            <%
            //Load the MySql Driver.
              Class.forName("com.mysql.jdbc.Driver");
              String url = "jdbc:mysql://localhost:3306/JunkDB";
              java.sql.Connection con = java.sql.DriverManager.getConnection(url, "", "");
              java.sql.ResultSet rsMake = con.createStatement().executeQuery("SELECT DISTINCT make FROM make_and_model ORDER BY make");
              String strMake= "";%>
            <!--Display the make list-->  
            <html:select property="make" value="make" size="1" name="make">
            <html:option value="---Select a Make ----"></html:option>
            <%while (rsMake.next()) {
              strMake = rsMake.getString("make");
              System.out.println("\tmake= " + strMake );%>
            <html:option value="<%=strMake.toString()%>"></html:option>       
            <%} //end while loop
            //<!--Display the model list-->%>  
            </html:select>
            <html:select property="model" value="model" size="1" name="model">
            <html:option value="---Select a model ----"></html:option>
            <%java.sql.ResultSet rsModel = con.createStatement().executeQuery("SELECT model FROM make_and_model WHERE make='" + strMake //I want to put the value of the MAkE over here so I can get the models form database+ "' ORDER BY model");%>
            <%while (rsModel.next()) {
              String strModel = rsModel.getString("model");
              System.out.println("\tmodel= " + strModel );%>
              <html:option value="<%=strModel.toString()%>"></html:option>
            <%} //end while loop
            con.close();
            System.out.println("connection closed");%>
            </html:select>
                <p><input id="notify" name="notify" class="notify" size="24" disabled="disabled" type="text"></p>
            <hr><br>
            </html:form>So how can I get the value of "make" so I can get all models for this kind of "make" ??
    Am I doing it right ??? Or I am going to a wrong direction ???
    Thanks for any input . I am new with JSP and struts

    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 get the values of all rows in advanced table

    HI All,
    I am using an advanced table to enter the values for the service contract line (its a custom page)in that advanced table i ahave column with lov called task number for that task number once i had choosed one task number and creating one more row using add anethor row button i want to restrict the user to not to choose the task number which was entered in the previus row.
    Or if this is not possible i want to restrict the user by showing an error message when click on the submit button by saying you have choosed the duplicate task number please choose a uniqu task number
    please give some hints
    thanks
    ajay

    Hi
    your approach will have two steps
    1.) use the row refernce and get the value of task number of the row which is enterd by user .
    2.) use getRows in range and compare values of task number of every row with the user selected value ,if value match then throw error.
    Thanks
    Pratap

  • Get ID from selected row in data table

    Hi!
    Does someone know how to get ID from row on which I click a button or link?
    getRowData() doesnt work!
    Or any other method in jsp or just something to get the ID from selected row?
    Thanks!!!

    Hi,
    I have a table with 3 columns, where column 1 represents the key, column 2 represents the data and column 3 displays the "details"-button. If you use
    String key =(String)outputText1.getValue();
    the variable key contains the key value of the row of the column in which the "details"-button was clicked. (outputText1 is the Output Text field of the first column).
    Problem with this is that the key Value must be displayed in the table but maybe it works if the OutputText Field is not rendered, too. If anyone has another (maybe nicer) solution for the problem i would be pleased to see it here.

  • 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

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • 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 of Selected Dimension in a Pie Chart ?

    Hi All,
    Here is an example i'm working on ,
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    I'm using selectData event to fire when any data is selected in the chart. How to get the value of dimension, in my case country which has been selected ?
    Thanks & Regards
    Sakthivel

    Hi,
    I added below code
    var oSelectData = oEvent.getParameter("data");
    // let the dataset convert the event coordinates back to a UI5 model context
    var oContext = this.getDataset().findContext(oSelectData[0].data[0].ctx.path);
                   console.log(oContext);
    in console  I am able to get the path of selected dimention.
    JS Bin - Collaborative JavaScript Debugging&lt;/title&gt; &lt;link rel=&quot;icon&quot; href=&quot;http://static.jsbin.…
    you can figure out how to get the data from this information.
    Regards,
    Chandra

  • [help?]How to get the �HttpServletResponse� from �Actionservlet� ?

    Anyone knows how to get the �HttpServletResponse� from �Actionservlet� ?
    Is it possible?
    #org.apache.struts.action.ActionServlet
    And i'm using struts framework.
    Any reply would be valuable.
    Thank you in advance.

    How did you obtained the reference to ActionServlet?
    Any of doPost, doGet or doService are called automatically by servlet container ( it provides the reference to request and response).
    Search for class org.apache.struts2.ServletActionContext
    HttpServletRequest request = ServletActionContext.getRequest();

  • 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

Maybe you are looking for

  • Cannot create new posting period

    Hi, A customer is unable to create a new posting period for year 2012. The following error message appears: "No matching records found. Period Category (OACP) ODBC-2028. Message 131-133". SAP version: 8.81 I  searched in notes & forums but I couldn't

  • Itunes match 4010 error

    Today I'm getting an "unknown error occured (4010)" when iTunes Match tries to update.  It sits at "Waiting for Apple to deliver your iTunes Match result..." for awhile and then it puts up that error.  It did so both before updating to iTunes 10.7 (W

  • I have a problem with this section

    catch (ClassNotFoundException cnfe) System.err.println("Derby driver not found."); try System.out.println("Available drivers:"); Enumeration<Driver> drivers = DriverManager.getDrivers(); while (drivers.hasMoreElements()) System.out.println(drivers.ne

  • Problem in updating FPLT Table with custom fields of the billing plan

    Hi Guys I have a requirement to add 2 custom fieldd in the billing plan tab of sales order and I could not find any screen exit for that. However I got access key and added those 2 fields on the screen but I am not able to uodate table FPLT from ther

  • How To Download 32 Bit PE10 for Vista 64 Bit PC?

    I purchased a bundled Adobe Photoshop Elements 10 & Premiere Elements 10.  When attempting to install Premiere Elements 10 I received an error stating.. This installer does not support 64 Bit Windows XP or Vista.  If you are installing from discs pel