JSF datatable to get multiple row values

I want to get values of SelectBooleanCheckbox and SelectOneMenu in jsf bean from datatable for multiple rows?

You can find an example here: http://balusc.blogspot.com/2006/06/using-datatables.html

Similar Messages

  • Getting multiple row value on valuechange of selectBooleanCheckbox in table

    Hello All,
    I am using jDeveloper 11.1.1.5. I have a java class which is returning me a list. I have created a data control of my class and I am using it on my page as a table.
    On my page I have inserted a text box selectedamount. In my table there are 4 columns Type, Qty, Amount and one boolean value select. I have changed column select to selectBooleanCheckbox. and I have specified its value as true(when selected) and false(when deselected). Which is getting reflected in my pagedef file.
    There are 4 rows coming in table and displaying properly.
    Now my requirement is on value change of selectBooleanCheckbox if user selects the rows I want to add the Amount for the selected row and I have to set it to the text box selectedamount.
    On value change of selectBooleanCheckbox I have written a method. Code snippet is like this:
    +public void valueChanged(ValueChangeEvent valuechangeevent) {+
    +if (valuechangeevent.getNewValue() == valuechangeevent.getOldValue()) {+
    System.out.println("new value is same as old value");
    +} else {+
    System.out.println("************************new value is other than old value**********************************");
    DCBindingContainer bindings =(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iter = bindings.findIteratorBinding("NAME OF MY ITERATOR");
    float temp2 = 0;
    Row currentRow ;
    int count = (int)iter.getViewObject().getEstimatedRowCount();
    for (int i=1; i<=count;i++) {
    currentRow =   iter.getRowAtRangeIndex(i);
    +if(currentRow != null) {+
    if(true == currentRow.getAttribute("select"))
    +{+
    temp2= temp2 + Float.parseFloat(currentRow.getAttribute("totAmount").toString());
    System.out.println("value of total amount after adding is :: "+ temp2);
    +}+
    +}+
    +}+
    After this I am setting temp2 to selectedamount textbox.
    But I am not getting the desired value in the textbox.
    Is there any other method I can achieve this.
    Thanks
    Navin K

    Inside f(currentRow != null) When I added
    System.out.println(currentRow.getAttribute("select"));
    It is showing as null.
    So select attribute is not getting assigned as true or false while checking and unchecking selectboolean checkbox.
    Am I missing something ?

  • How to get multiple row values in one text box while clicking one row from grid?

    hi friends,
               i am working on flex4 web application i am using  one datagrid ,it have two records(bills),one button and one text box.
    ex:
    customername      salesrepname   receipt no      amount
    venkat                         raj                         1102          10000
    ramu                          ramesh                   1102         20000
    here both receipt no is same.now i want to select one of this receipt and click pay button which is place in outside the grid.
    now my need is after click the pay button in text box i need 10000+20000=30000,after click that button i want both receipts should be invisible...'
    how i will do this,
    any suggession,
    Thanks
    B.venkatesan

    One way with 10g:
    select mgr,
           rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',')  emps
    from emp
    where mgr is not null
    group by mgr;10g:
    -- define this function:
    create or replace
    function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
    as
      val varchar2(100);
      return_value varchar2(4000);
    begin
    --  open c;
      loop
      fetch c into val;
      exit when c%notfound;
      if return_value is null then
        return_value:=val;
      else
        return_value:=return_value||sep||val;
      end if;
      end loop;
      return return_value;
    end;
    select mgr,
           concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
    from emp
    where mgr is not null
    group by mgr;With 11g:
    select mgr,
           listagg(empno,',') within group (order by empno) emps
    from emp
    where mgr is not null
    group by mgr;

  • Concatenate multiple row values into single column value

    Hello,
    Can anyone please refresh my memory on how to concatenate multiple row values into a single column value.
    In the following query, I will get multiple denial reasons per application and I would rather return all denial reasons on one line.
    SELECT a.application_id, a.membership_number,
    r.reason_text AS denial_reason,
    a.appl_receipt_date AS application_receipt_date,
    a.plan_request_1 AS application_plan_code,
    a.adjudication_date AS application_denial_date
    FROM application a, PLAN p, application_reason ar, reason r
    WHERE a.plan_request_1 = p.plan_cd
    AND a.application_id = ar.application_id
    AND ar.reason_id = r.reason_id
    AND a.adjudication_cd = 'D'
    AND a.appl_receipt_date BETWEEN '01-jan-2006' AND '31-dec-2006'
    AND p.plan_type_id = 12 and a.application_id = :appId
    ORDER BY application_id
    Any help is greatly appreciated.
    Thanks,
    -Christine

    found the following
    SELECT deptno,
           LTRIM(MAX(SYS_CONNECT_BY_PATH(ename,','))
           KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
    FROM   (SELECT deptno,
                   ename,
                   ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) AS curr,
                   ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) -1 AS prev
            FROM   emp)
    GROUP BY deptno
    CONNECT BY prev = PRIOR curr AND deptno = PRIOR deptno
    START WITH curr = 1;
        DEPTNO EMPLOYEES
            10 CLARK,KING,MILLER
            20 ADAMS,FORD,JONES,SCOTT,SMITH
            30 ALLEN,BLAKE,JAMES,MARTIN,TURNER,WARD
    3 rows selected.at http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php

  • Issue in getting current row value using getCurrent Value

    Issue:When I call ththe method executeSearchVO from controller class
    with Row row = personalActionSearchVO.first();
    I am getting the corresponding value.
    but my requirement is I have multiple record , If i press action on any of the record, I need to read SITName value for the particular record and need to pass it as parameter to other pager(i mean If i select any record, I need to get corresponding value in the attribute for the record.)
    if i comment personalActionSearchVO.first(); i am getting null pointer exception.
    Pl. helpme how to get current row instead of first row always.
    AMIMPL Clause
    public void executeSearchVO(String loginPersonId)
    XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
    personalActionSearchVO.initQuery(loginPersonId);
    // Row row = personalActionSearchVO.first();
    row = personalActionSearchVO.getFirstFilteredRow("action","1");
    Row masterRow = row;
    personalActionSearchVO.setCurrentRow(masterRow);
    OARow Row1 = (OARow)personalActionSearchVO.getCurrentRow();
    System.out.println("Org "+Row1.getAttribute("Organization"));
    calling this method from controller clause
    if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
    System.out.println("Person Id "+ pageContext.getParameter("XXHRPersonId"));
    Serializable methodParams[] = {pageContext.getEmployeeId()+""};
    applicationModule.invokeMethod("executeSearchVO",methodParams);
    need it urgently. pl. help
    thanks
    siva

    Timo,
    I am new to Jdevloper. I will explain the issue in detail.
    Version: Oracle 9i Jdeveloper
    I have a query page with multiple records. when I perform action , I need to pass 2 parameters from query screen to my actual page.
    1 parameter is Login person Id,. Now the issue is with getting current value for 2nd paramenter. 2nd Parameter will be changed depends upon record i am choosing in my query page: column is : Information Name.
    when I use getcurrentrow , I am getting null pointer exception.
    My controller class when I click action button :
    if("action".equals(pageContext.getParameter(EVENT_PARAM)) )
    Serializable methodParams[] = {pageContext.getEmployeeId()+""};
    applicationModule.invokeMethod("executeSearchVO1",methodParams);
    {color:#993300}
    // Here I need to get InformationName value based on the record I am choosing{color}
    HashMap hashMap = new HashMap(2);
    hashMap.put("XXHRPersonId", pageContext.getParameter("XXHRPersonId"));
    // hashMap.put("InformationName", methodParams);
    pageContext.forwardImmediately(
    "OA.jsp?page=/xxhr/oracle/apps/xxhr/selfservice/personalaction/webui/XXHRPersonalActionPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    hashMap,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO
    my AMIMPL Clause :
    I am just pasting whatever I have tried. Pl. suggest me If my code is wrong.
    *{color:#993300}I need to get current row information value from the below method*
    *{color}*
    public void executeSearchVO1(String loginPersonId)
    XXHRPersonalActionSearchVOImpl personalActionSearchVO =getXXHRPersonalActionSearchVO1();
    personalActionSearchVO.initQuery(loginPersonId);
    System.out.println("Row count "+personalActionSearchVO.getRowCount());
    // Row row = personalActionSearchVO.first();
    Row row = personalActionSearchVO.getCurrentRow();
    System.out.println("Informaton Name "+row.getAttribute("InformationName");
    In this , If i initialzie with Row row = personalActionSearchVO.first();I am able to get value for my column Information Name.
    whereas, if I use directly Row row = personalActionSearchVO.getCurrentRow();, i am getting null pointer exception.
    Pl. let me know how to get current row value for Information Name.
    Looking for the reply at the earliest.
    Thanks
    siva

  • How to get multiple rows from database table?

    hello !
    I need to get multiple rows from a OLEDB database table and display them on a table object.
    I did "Wrap in subfrom" on the table,  set  subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
    But I can get only one row on the table object.
    I need your help.
    Thanks

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Trying to get multiple cell values within a geometry

    I am provided with 3 tables:
    1 - The GeoRaster
    2 - The geoRasterData table
    3 - A VAT table who's PK is the cell value from the above tables
    Currently the user can select a point in our application and by using the getCellValue we get the cell value which is the PK on the 3rd table and this gives us the details to return to the user.
    We now want to give the worst scenario within a given geometry or distance. So if I get back all the cell values within a given geometry/distance I can then call my other functions against the 3rd table to get the worst scores.
    I had a conversation open for this before where JeffreyXie had some brilliant input, but it got archived while I was waiting on Oracle to resolve a bug (about 7 months)
    See:
    Trying to get multiple cell values within a geometry
    If I am looking to get a list of cell values that interact with my geometry/distance and then loop through them, is there a better way?
    BTW, if anybody wants to play with this functionality, it only seems to work in 11.2.0.4.
    Below is the code I was using last, I think it is trying to get the cell values but the numbers coming back are not correct, I think I am converting the binary to integer wrong.
    Any ideas?
    CREATE OR REPLACE FUNCTION GEOSUK.getCellValuesInGeom_FNC RETURN VARCHAR2 AS
    gr sdo_georaster;
    lb blob;
    win1 sdo_geometry;
    win2 sdo_number_array;
    status VARCHAR2(1000) := NULL;
    CDP varchar2(80);
    FLT number := 0;
    cdl number;
    vals varchar2(32000) := null;
    VAL number;
    amt0 integer;
    amt integer;
    off integer;
    len integer;
    buf raw(32767);
    MAXV number := null;
    r1 raw(1);
    r2 raw(2);
    r4 raw(200);
    r8 raw(8);
    MATCH varchar2(10) := '';
    ROW_COUNT integer := 0;
    COL_COUNT integer := 0;
    ROW_CUR integer := 0;
    COL_CUR integer := 0;
    CUR_XOFFSET integer := 0;
    CUR_YOFFSET integer := 0;
    ORIGINY integer := 0;
    ORIGINX integer := 0;
    XOFF number(38,0) := 0;
    YOFF number(38,0) := 0;
    BEGIN
    status := '1';
    SELECT a.georaster INTO gr FROM JBA_MEGARASTER_1012 a WHERE id=1;
    -- first figure out the celldepth from the metadata
    cdp := gr.metadata.extract('/georasterMetadata/rasterInfo/cellDepth/text()',
    'xmlns=http://xmlns.oracle.com/spatial/georaster').getStringVal();
    if cdp = '32BIT_REAL' then
    flt := 1;
    end if;
    cdl := sdo_geor.getCellDepth(gr);
    if cdl < 8 then
    -- if celldepth<8bit, get the cell values as 8bit integers
    cdl := 8;
    end if;
    dbms_lob.createTemporary(lb, TRUE);
    status := '2';
    -- querying/clipping polygon
    win1 := SDO_GEOM.SDO_BUFFER(SDO_GEOMETRY(2001,27700,MDSYS.SDO_POINT_TYPE(473517,173650.3, NULL),NULL,NULL), 10, .005);
    status := '1.2';
    sdo_geor.getRasterSubset(gr, 0, win1, '1',
    lb, win2, NULL, NULL, 'TRUE');
    -- Then work on the resulting subset stored in lb.
    status := '2.3';
    DBMS_OUTPUT.PUT_LINE ( 'cdl: '||cdl );
    len := dbms_lob.getlength(lb);
    cdl := cdl / 8;
    -- make sure to read all the bytes of a cell value at one run
    amt := floor(32767 / cdl) * cdl;
    amt0 := amt;
    status := '3';
    ROW_COUNT := (WIN2(3) - WIN2(1))+1;
    COL_COUNT := (WIN2(4) - WIN2(2))+1;
    --NEED TO FETCH FROM RASTER
    ORIGINY := 979405;
    ORIGINX := 91685;
    --CALCUALATE BLOB AREA
    YOFF := ORIGINY - (WIN2(1) * 5); --177005;
    XOFF := ORIGINX + (WIN2(2) * 5); --530505;
    status := '4';
    --LOOP CELLS
    off := 1;
    WHILE off <= LEN LOOP
    dbms_lob.read(lb, amt, off, buf);
    for I in 1..AMT/CDL LOOP
    if cdl = 1 then
    r1 := utl_raw.substr(buf, (i-1)*cdl+1, cdl);
    VAL := UTL_RAW.CAST_TO_BINARY_INTEGER(R1);
    elsif cdl = 2 then
    r2 := utl_raw.substr(buf, (i-1)*cdl+1, cdl);
    val := utl_raw.cast_to_binary_integer(r2);
    ELSIF CDL = 4 then
    IF (((i-1)*cdl+1) + cdl) > len THEN
    r4 := utl_raw.substr(buf, (i-1)*cdl+1, (len - ((i-1)*cdl+1)));
    ELSE
    r4 := utl_raw.substr(buf, (i-1)*cdl+1, cdl+1);
    END IF;
    if flt = 0 then
    val := utl_raw.cast_to_binary_integer(r4);
    else
    val := utl_raw.cast_to_binary_float(r4);
    end if;
    elsif cdl = 8 then
    r8 := utl_raw.substr(buf, (i-1)*cdl+1, cdl);
    val := utl_raw.cast_to_binary_double(r8);
    end if;
    if MAXV is null or MAXV < VAL then
    MAXV := VAL;
    end if;
    IF i = 1 THEN
    VALS := VALS || VAL;
    ELSE
    VALS := VALS ||'|'|| VAL;
    END IF;
    end loop;
    off := off+amt;
    amt := amt0;
    end loop;
    dbms_lob.freeTemporary(lb);
    status := '5';
    RETURN VALS;
    EXCEPTION
        WHEN OTHERS THEN
            RAISE_APPLICATION_ERROR(-20001, 'GENERAL ERROR IN MY PROC, Status: '||status||', SQL ERROR: '||SQLERRM);
    END;

    Hey guys,
    Zzhang,
    That's a good spot and as it happens I spotted that and that is why I am sure I am querying that lob wrong. I always get the a logic going past the total length of the lob.
    I think I am ok using 11.2.0.4, if I can get this working it is really important to us, so saying to roll up to 11.2.0.4 for this would be no problem.
    The error in 11.2.0.3 was an internal error: [kghstack_underflow_internal_3].
    Something that I think I need to find out more about, but am struggling to get more information on is, I am assuming that the lob that is returned is all cell values or at lest an array of 4 byte (32 bit) chunks, although, I don't know this.
    Is that a correct assumption or is there more to it?
    Have either of you seen any documentation on how to query this lob?
    Thanks

  • How to get Current Row values in Af:ForEach

    Hi,
    We have a requirement to conditionally Display/Hide CommandLink item in af:forEach Loop.
    <af:forEach items="#{bindings.RegionalAreaPVO.rangeSet}" var="parent">
    <af:spacer height="10" id="s1"/>
    <af:commandLink inlineStyle="font-weight:bold;" text="#{parent.ItemName}" partialSubmit="true" actionListener="#{backingBeanScope.RegionalAreaBean.launchTaskflow}" id="cl1" rendered="*#{backingBeanScope.XXWFCRegionalAreaBean.modelEligibleflag eq true}*">
    <af:setActionListener from="#{parent.Code}" to="#{parentNode}"/>
    </af:commandLink>
    </af:forEach>
    I have added a Cutom Managed Bean Class and Returning boolean value to Control Render property which is working. But now i want to add business Logic based on 'parent.ItemName' or 'parentNode' Values in the bean method to return proper Boolean value.
    But i am unable to get the Current Iteration values in the bean method.
    I am using below EL expressions to get the values. But no luck.
    String nameel = (String)ADFUtil.evaluateEL("#{bindings.parent.ItemName}");
    String codeel = (String)ADFUtil.evaluateEL("#{parent.Code}");
    String nodeEl = (String)ADFUtil.evaluateEL("#{parentNode}");
    Also, i have tried getting the Row object like below but i am getting the First row details always. My intention is to get Current row values and use them for Business logic.
    ViewRowImpl row =
    (ViewRowImpl)ADFUtil.evaluateEL("#{bindings." + VoName +
    "Iterator.currentRow}");
    String code = (String)row.getAttribute("Code");
    Any help is highly appreciated.
    Thanks
    Kaja

    Hi Sascha,
    I have tried that. But in my case the functional logic behind the Rendering is based on more complex logic. Hence i am trying to add a method to return a boolean in Render property of the Link.
    But the real problem for me is, in the Managed bean method i am not finding a way to get the Current Iteration index. If i can get the Current iteration index, i can get the Corresponding Component ID of Command link (In the forEach Loop Component Id's are getting generated Dynamically based on Iteration Index), i can use that and add additional logic and derive true/false to return.
    Any inputs?
    Thanks
    Kaja

  • How get pervious row value in grid

    hi master
    sir
    I have grid in my form my user design the balance sheet
    Then he want add the last row value in next row
    Such as
    Row2          amount=1000
    Row3               row2+2000
    Total          row3-row2
    How I get last row value
    Please give me idea

    Other solution is to use a collection in a package unit.
    Type TYP_COLL is table of Number INDEX BY BINARY_INTEGER ;
    my_coll TYP_COLL ;
    Then in the Post-Trigger :
    my_coll( :system.current_record ) := value ;so you can navigate easily within the collection in both directions Next/Previous.
    Easy to get the previous value:
    value := my_coll( :system.current_record - 1 ) ;Francois

  • H:datatable..select multiple rows

    Hi all, i'm trying to select multiple rows but couldn't do it.. can you please help me to solve this trouble?
    Here the code..
    kbankMainView.jsp
    function doCount() {
              button = document.getElementById('formProcedurelist:buttonCount');
              button.click();
    <h:commandButton id="buttonCount" style="visibility:hidden" action="#{MainViewBean.getSelectedItems}"></h:commandButton>
    <h:dataTable id="tableProcedurelist" value="#{MainViewBean.procedureList}" rendered="#{!empty MainViewBean.procedureList}" var="procedure" border="1" headerClass="heading" columnClasses="col0,col1,col2,col3,col4,col5">
                                <h:column>
                                     <f:facet name="header">
                                       <f:verbatim>Sel.</f:verbatim>
                                  </f:facet>
                                     <h:selectBooleanCheckbox value="#{MainViewBean.selectedIds[procedure.idProcedura]}" style="cursor:pointer" onclick="javascript:doCount()"/>
                                </h:column>Here my bean..
    MainViewBean
    private List<TKbankProcedure> selectedProcedureList;
    private Map<Integer, Boolean> selectedIds = new HashMap<Integer, Boolean>();
    private ArrayList<TKbankProcedure> procedureList;
    public void getSelectedItems() {
             // Get selected items.
             selectedProcedureList = new ArrayList<TKbankProcedure>();
            for (TKbankProcedure procedure : procedureList) {
                if (selectedIds.get(procedure.getIdProcedura()).booleanValue()) {
                     selectedProcedureList.add(procedure);
                    selectedIds.remove(procedure.getIdProcedura()); // Reset
            System.out.println("number sel. items = " + selectedProcedureList.size());
        }and here my faces-config.xml:
    <managed-property>
                   <property-name>selectedIds</property-name>
                   <property-class>java.util.Map</property-class>
                   <map-entries>
                        <key-class>java.lang.Integer</key-class>
                        <value-class>java.lang.Boolean</value-class>
                   </map-entries>
              </managed-property>
              <managed-property>
                   <property-name>selectedProcedureList</property-name>
                   <property-class>java.util.List</property-class>
                   <list-entries>
                        <value-class>databaseKbank.TKbankProcedure</value-class>
                   </list-entries>
              </managed-property>
              <managed-property>
                   <property-name>procedureList</property-name>
                   <property-class>java.util.ArrayList</property-class>
                   <list-entries>
                        <value-class>databaseKbank.TKbankProcedure</value-class>
                   </list-entries>
              </managed-property>I can't understand why returns me 0 elements selected..i really hope in your help!
    However, thanks BalusC for the help you gave me in the other post!!
    Edited by: emergencyDeveloper on Dec 22, 2008 7:52 AM

    BalusC, i've removed entries and seemed to work..but still doesn't!
    Returns me these Exceptions:
    ERROR [InvokeApplicationPhase] #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
    javax.faces.FacesException: #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         ... 26 more
    Caused by: java.lang.NullPointerException
         at m2u_kbank.MainViewBean.getSelectedItems(MainViewBean.java:251)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 27 more
    11:32:37,698 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
    javax.faces.FacesException: #{MainViewBean.getSelectedItems}: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:78)
    Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:130)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         ... 26 more
    Caused by: java.lang.NullPointerException
         at m2u_kbank.MainViewBean.getSelectedItems(MainViewBean.java:251)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         ... 27 moreCan't found data in procedureList ArrayList, i think error is there..
    Bean:
    public void getSelectedItems() {
             // Get selected items.
             selectedProcedureList = new ArrayList<TKbankProcedure>();
             Iterator it = procedureList.iterator();
            while (it.hasNext()) {
                 TKbankProcedure procedure = (TKbankProcedure)it.next();
                if (selectedIds.get(procedure.getIdProcedura()).booleanValue()) {
                     selectedProcedureList.add(procedure);
                    selectedIds.remove(procedure.getIdProcedura()); // Reset
        }Hope in your suggest!
    Thanks

  • How to get edited row values from ADF table?

    JDev 11.
    I have a table which is populated with data from Bean.
    I need to save changes after user make changes in any table cell. InputText is defined for table column component.
    I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    getSelectedRow();
    SaveMaterial(material);
    This method should call getSelectedRow which take values from selected table row and save them into object:
    private Row getSelectedRow(){
    RichTable table = this.getMaterialTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object o = table.getRowData();
    material = (MATERIAL) o;
    System.out.println("Selected Material Desc = "+material.getEnumb());
    return null;
    Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
    I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
    JSF:
    <af:table var="row" rowSelection="single" columnSelection="single"
    value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
    <af:column sortable="false" headerText="E-number">
    <af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    <af:column sortable="false" headerText="Description">
    <af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    </af:table>
    <af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
    What is a correct place from where save method should be called to get new (edited) values from ADF table?
    Thanks.

    Did you look into the valueChangeEvent?
    It has oldValue and newValue attributes.
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }Timo

  • How to get multiple Rows in UCCX DB

    Hi All,
    Here is the scenario. One of customer has DB which return the multiple rows of data by querying against one Field.
    suppose there is a Field "National ID Number"  which fetches cutomers' more than one account like post paid customer , prepaid customer, corporate customer etc in different Rows then how could i check this if the customer has more than one Account system should ask about the particular Account Number.
    any help would be grateful for me.
    Thanks

    Is the following way seem correct to store values in an array var
    db read
      successful
        label get_next_record
        db get
          successful
            /* Action to store values in Array variable */
                        Array[c]=accno
    /* “accno” is a variable with Big Dec Type having all possible values fetched by multiple rows */
                        c=c+1 /* where “c” is an index var */
                        goto get_next_record
          no data
            goto no_more_records
    label no_more_records

  • Get multiple rows from mysql query in NetBeans

    Hi, I am working on a project in NetBeans 6.I have a checkboxlist, and I have a variable in which I save the selected values of the checkboxlist.Now, I want to make a query that will get the rows of the rowset that have the same id as the selected values.for example, I have a checkboxlist that has the following values: Helen, Maria, Anna.The user checks the first two, so I have a variable String[] "checked" that has in it the data 1,2.Now, I have a rowset that has the following query:
    SELECT ALL person.age
    FROM person
    WHERE person.id=? or something like this.I want the parameters to have the values (1,2) so that the rowset has the results of the ages of the two first rows.How do I accomplish that?I am assuming that with one "?" it can't be done because I need multiple parameters. Will something like this work: WHERE person.id IN something,but what will something be?

    christomar wrote:
    I have a rowset that has the following query:
    SELECT ALL person.age
    FROM person
    WHERE person.id=? or something like this.I want the parameters to have the values (1,2) so that the rowset has the results of the ages of the two first rows.How do I accomplish that?Use a PreparedStatement. You probably first need to read the Sun JDBC Tutorial before you do anything.
    I am assuming that with one "?" it can't be done because I need multiple parameters. I've seen people use up to 76 parameters so yes it can be done, it will look like this:
    Will something like this work: WHERE person.id IN something,Yes, you can submit any SQL you want as long as your db supports it (all support ANSI i believe)
    but what will something be?something in that context would be a list/set of data, but you're getting ahead of yourself I think. do the tutorial and look at some code

  • Get selected row values from Table view control

    Hi ,
    I am using transaction ME23N, would like to access row values from item table for selected row. I have written a script as in screen shot and its giving me error at java script step two. I want to get the PR number from item table for selected row.
    With Regards
    Vishal Lokapur

    H Vishal,
    Can you please share how you were able to resolve the issue regarding the selected row
    in case of a table control .
    Regards

  • How to get multiple rows at one time in a table?

    hi
    I have a JTable bound with ViewObject and i use multiple selection mode setting to get selection row.
    My question is when i select more then one row at one time i only can get those index from JTable but can't get those rows from ViewObject.is it possible to get rows from ViewObject? or how to use JTable row index to get row from ViewObject?

    repost

Maybe you are looking for