How to get the last value edited by users from JTable?

Hi.
I have a JDialog that includes an editable JTable. This table is used to set up field caption and font for a report program. I found only when cursor is moved to another cell, the value in current cell being edited will be transferred to Table Model. So if the user don�t move cursor to another cell after editing the value of a cell but click OK button directly, Table Model cannot get the last value edited by the user, I wonder if there is a way to fire JTable to transfer the value being edited to Table model.
By the way, I found if the TableCellEditor is using JCheckBox or JComboBox instead of JTextField, there is no this problem.
Thank you for any reply.

I guess you can make use of the following methods on your table model to inform it make it getValueAt bcos table data has changed.
fireTableCellUpdated
Notifies all listeners that the value of the cell at [row, column] has been updated.
fireTableChanged
Forwards the given notification event to all TableModelListeners that registered themselves as listeners for this table model.
fireTableDataChanged
Notifies all listeners that all cell values in the table's rows may have changed. The number of rows may also have changed and the JTable should redraw the table from scratch. The structure of the table (as in the order of the columns) is assumed to be the same.
But when to call these methods??
-- When OK button is pressed, do this as the first thing!!
OR
-- Call this on every key event!!
regds,
CA

Similar Messages

  • JTable problem : how to get the last value entered by user + event lost

    Hi all,
    I have 2 problems with Jtable class.
    1 => To get the last value entered by user in a cell,
    it seems that we must change the selected cell.
    That is to say we can only have the previous cell's value.
    Is there a simple way to get the current value of any cell ?
    2 => To resolve the problem i store the values of each cell in a vector and i intercept keyboard event (!)
    BUT, when i do a double click with the mouse on the Jtable, i loose keyboard events. Then, i can't intercept them.
    Is it a bug of swing or am i following a wrong way ?
    Thanks by anticipation for your help.

    You have to fire the "TableCellUpdatedEvent"
    and override the getCellEditorValue in TableCellEditor to return the current value

  • JTable: How to get the last value entered ?

    I have a JTable, with 2 columns and 3 rows that I need to fill..
    If I don't press the Enter key after filling each cell, and if I call the foloowing method
    void readTable()
          String[][] myarray = new String[3][2]; 
           for (int i = 0 ; i<3;i++)
            for (j=0 ; j<2; j++)
             myrray[i][j]  = (String) table.getValueAt(i, j);
    }the last returned value is null.
    Is it possible to simulate the Enter key by program (or any other way) to make sure to get the last edited cell value, whether or not the user press the enter key before clicking on a button (for example) to execute the above code. ?
    Thanks a lot for help
    Gege

    Thanks Camikr, using
    table.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);works fine. It's exactly what I was looking for.
    Thanks again.
    Gege

  • HOW TO GET THE SELECTED VALUE IN A ROW FROM ONE VIEW TO ANOTHER VIEW?

    hi all,
    I  have a small issue.
    i have created two views.In the table of the first view i'm selecting a row and pressing the button it will move to next view.
    i am adding some fields manually in the table of the second view and pressing the save button.Here all the values should get updated corresponding to the field which i have selected in the first view.
    I want to know how to get the particular field in the selected row from one view to another view.
    Kindly help me.

    Hi,
            Any data sharing accross views can be achiveved by defining CONTEXT data in COMPONENT CONTROLLER and mapping it to the CONTEXT of all the views. Follow the below steps.
    1. Define a CONTEXT NODE in component controller
    2. Define same CONTEXT NODE in all the views where this has to be accessed & changed.
    3. Go to CONTEXT NODE of each view, right click on the node and choose DEFINE MAPPING.
    This is how you map CONTEXT NODE and same can be accessed/changed from any VIEW or even from COMPONENT CONTROLLER. Any change happens at one VIEW will be automatically available in others.
    Check the below link for more info regarding same.
    [http://help.sap.com/saphelp_nw04s/helpdata/EN/48/444941db42f423e10000000a155106/content.htm]
    Regards,
    Manne.

  • How to get the screen value to custom screen from standard screen

    Hi all,
    I have a standard screen which is attached to a standard function group and a custom screen which is attached to a custom function group... Now my requirement is to get some field values from the Std screen to my custom screen ...
    I have used the FM DYNP_VALUES_READ but its resuts in error...
    in my current screen PBO i called this FM and given the prog name as the Std pgm name which being created while creating the screen from the function group and the screen number as the standard screen number...
    Eg : Standard Function gp = FSBP_02
           Pgm name  = SAPLFSBP_02
          Screen Naumber = 0220
    Custom screen = 9001
    Pgn Name = zname
    in 9001 PBo i called
    DATA: IT_DYNPFIELDS  TYPE TABLE OF DYNPREAD,
           WA_DYNPFIELDS like line of IT_DYNPFIELDS.
    WA_DYNPFIELDS-FIELDNAME = 'BP021-BUSINESS_Y'.
    APPEND WA_DYNPFIELDS TO IT_DYNPFIELDS.
    CALL FUNCTION 'DYNP_VALUES_READ'
       EXPORTING
         DYNAME                               = 'SAPLFSBP_02'
         DYNUMB                               = '0220'
        TRANSLATE_TO_UPPER                   = ' '
        REQUEST                              = ' '
        PERFORM_CONVERSION_EXITS             = ' '
        PERFORM_INPUT_CONVERSION             = ' '
        DETERMINE_LOOP_INDEX                 = ' '
        START_SEARCH_IN_CURRENT_SCREEN       = ' '
        START_SEARCH_IN_MAIN_SCREEN          = ' '
        START_SEARCH_IN_STACKED_SCREEN       = ' '
        START_SEARCH_ON_SCR_STACKPOS         = ' '
        SEARCH_OWN_SUBSCREENS_FIRST          = ' '
        SEARCHPATH_OF_SUBSCREEN_AREAS        = ' '
       TABLES
         DYNPFIELDS                           = IT_DYNPFIELDS
      EXCEPTIONS
        INVALID_ABAPWORKAREA                 = 1
        INVALID_DYNPROFIELD                  = 2
        INVALID_DYNPRONAME                   = 3
        INVALID_DYNPRONUMMER                 = 4
        INVALID_REQUEST                      = 5
        NO_FIELDDESCRIPTION                  = 6
        INVALID_PARAMETER                    = 7
        UNDEFIND_ERROR                       = 8
        DOUBLE_CONVERSION                    = 9
        STEPL_NOT_FOUND                      = 10
        OTHERS                               = 11
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    How Can i get that... Its important ... Please help me...

    Hi,
        Try with the below FM
    RS_REFRESH_FROM_SELECTOPTIONS
    in your custorm program, check the SY-CPROG and SY-XPROG values, for the standard program name or directly pass the importing parameter for the above FM as SAPLFSBP_02.
    Regards
    Bala Krishna

  • Get the Last Value of Status Field from SQL TABLE using SQL 2008

    I have a table with Fields such as
    UploadstartTime, UploadEndtime, STATUS From TBLA.
    The STATUS Field, has values =7 and 11 are failed and 12 is SUCCESS. I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get STATUS For that record. How can I do that using 1 SQL Query?
    My current code is: The issue is
    select
      TBLNAME
    MaxUploadstarttime
    =
    max(UploadStartTime),
    MaxUploadEndtime
    =
    max(UpLoadEndTime),
         Status=max(status)
    from  DB.DBO.LOGTABLE
    p1

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. You failed! Temporal
    data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. 
    >> I have a table with Fields such as <<
    Fields are not columns! There is no generic status in RDBMS. Putting “tbl-” in a table name is called tibbling and we make fun of people who do it (Google Phil Factor's humor columns. If you were polite is this what you wanted to post? 
    CREATE TABLE Something_Uploads
    (upload_source_name CHAR(15) NOT NULL,
     upload_start_timestamp DATETIME2(0) NOT NULL,
     PRIMARY KEY (upload_source_name, upload_start_timestamp),
     upload_end_timestamp DATETIME2(0),
     CHECK(upload_start_timestamp < upload_end_timestamp),
     upload_status INTEGER NOT NULL 
       CHECK (upload_status IN (7,11,12, ..))
    >> I cannot do a max, since it will always show 12, I need to get the MAX(UPLOADENDTIME, and get upload_status For that record [sic]. How can I do that using 1 SQL Query?  <<
    Since you told us nothing and gave no sample data, want to correct this postign? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to get the layout values in F4 help from Other program ?

    Hello All,
           I have a program P1which calls other program P2 .
    When I execute P1 I have a parameter for Layout with F4.
    When I press  F4 I want the help values which are there in the lay out of the other program P2.
    For this I'm using the following code :-
    DATA  spec_layout        TYPE  disvariant.  "specific layout
    DATA  v_save             TYPE  c.           "Save mode
    DATA  gs_variant         TYPE  disvariant.  "for parameter IS_VARIANT
    DATA  gv_exit            TYPE  c.
    PARAMETERS:  p_vari  TYPE disvariant-variant.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
    *  gs_variant-report  = sy-repid.
    *  gs_variant-variant = p_vari.
      CLEAR gs_variant.
      MOVE  '/BSHP/FP_CALL_OF_PLAN' TO gs_variant-report. "Report von Original CALL_OF_PLAN
      gs_variant-variant = p_vari.
      CALL FUNCTION 'LVC_VARIANT_F4'
        EXPORTING
          is_variant = gs_variant
          i_save     = v_save
        IMPORTING
          e_exit     = gv_exit
          es_variant = spec_layout
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF gv_exit NE 'X'.
    *     set name of layout on selection screen
          p_vari    = spec_layout-variant.
        ENDIF.
      ENDIF.
    But still I'm not able to get the values.
    Can anyone help me out ?
    Regards,
    Deepu.K
    null

    This question has been asked and answered many times before.  Please read the following blog for a good start:
    /people/yohan.kariyawasan/blog/2009/03/18/ui-framework-news-f4-help
    Before posting further please do a search in this forum and also read the rules of engagement listed here:
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/home/rulesofEngagement
    I'm now locking this thread as it is a duplicate of an already answered question.
    Thank you,
    Stephen
    CRM Forum Moderator

  • How to get the real name of a user from WFSYST-AGENT

    Hi,
    I am retrieving the WFSYST-AGENT value (which correspond to the US<user_id> of the agent responsible of a task) in a container variable in my workflow.
    I would like to get the real name of the user represented by WFSYST-AGENT. How should I do that ?
    Thanks in advance for your help.
    Thibault

    Hi,
    Take the user name and write a select for database table USER_ADDR fetching fields NAME_FIRST and NAME_LAST by passing BNAME = username.
    Regards,
    Jayesh

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • How to get the last day of the week?

    Hii
    i can get the calender week number for any given date using
    SELECT to_char(to_date('04/04/2011','MM/DD/YYYY'),'WW') FROM dual
    can any body tell me, how to get the last day of that week ?
    and the answer should be 04/08/2011(8th april )
    thanks
    San
    Edited by: sandeep9 on Apr 4, 2011 3:50 AM

    Hi, San,
    Here's one way:
    WITH     sample_data     AS
         SELECT  DATE '2011-04-04'     AS dt
         FROM     dual
    SELECT  dt
    ,     TO_CHAR (dt, 'WW')     AS week_num
    ,     NEXT_DAY ( dt - 1
               , TO_CHAR ( TRUNC (dt, 'YEAR') - 1
                      , 'Day'
               )          AS end_o_week
    FROM     sample_data;Another way is to use date arrithmetic:
    WITH     sample_data     AS
         SELECT  DATE '2011-04-09'     AS dt
         FROM     dual
    SELECT  dt
    ,     TO_CHAR (dt, 'WW')     AS week_num
    ,     TRUNC (dt, 'YEAR')
          + (7 * CEIL ( (dt - (TRUNC (dt, 'YEAR') - 1))
                / 7
          - 1               AS using_date_arithmetic
    FROM     sample_data;

  • How to get the last page  SAP Script form

    How to get the last page  SAP Script form.
    I want to print a specific information in the last page of SAP form (Script). Please tell me how to get the last page number.
    Regards

    Hi
    You have to check the system variable &NEXTPAGE&, if it's 0 it means you're in the last page.
    From SAP Help:
    This symbol is used to print the number of the following page. The output format is the same as with &PAGE& .
    Note that on the last page of the output, in each window that is not of type MAIN, &NEXTPAGE& has the value 0.
    /: IF &NEXTPAGE& = '0'
       Last page
    /: ENDIF
    Max

  • How to get the checkbox value

    Hi,
    i am working in Oracle APEX. Can anyone tell me how to get the checkbox value Thru Pl/sql Procedure.
    Ex:
    if i have three users like 1) super admin 2) HR 3) user i am giving different grants to all. there s a check box i used if HR selected three grants i have to get the checked value from my procedure and put into a table in a single column.
    grants :
    1)user creation
    2)salary details
    3)Attendance details
    4)Allowance
    5)contacts
    if its checked i am returning 1 not checked i hav to return 0
    in my table i ahv to store 10111 like that......
    Edited by: user12356342 on Dec 16, 2009 3:33 AM

    Hi,
    As a starting point, look at: [http://download-uk.oracle.com/docs/cd/B31036_01/doc/appdev.22/b28839/check_box.htm#CHDCGIFA] as this explains how to use checkboxes on forms and reports
    Andy

  • How to get the DataGridColumn Value

    Hi All,
    I have a problem with DataGridColumn . In that "How to get
    the DataGridColumn value when the application loads"(here am not
    using anyother event).
    In my code i have three columns.I want to get the first
    datagridcolum(Name) values(all rows values).
    here i will send my code please refer ...
    <?xml version="1.0"?>
    <!-- DataGrid control example. -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    ]]>
    </mx:Script>
    <mx:XMLList id="employees">
    <employee>
    <name>Christina Coenraets</name>
    <phone>555-219-2270</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    <employee>
    <name>Joanne Wall</name>
    <phone>555-219-2012</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    <employee>
    <name>Maurice Smith</name>
    <phone>555-219-2012</phone>
    <email>[email protected]</email>
    <active>false</active>
    </employee>
    <employee>
    <name>Mary Jones</name>
    <phone>555-219-2000</phone>
    <email>[email protected]</email>
    <active>true</active>
    </employee>
    </mx:XMLList>
    <mx:Panel title="DataGrid Control Example" height="100%"
    width="100%"
    paddingTop="10" paddingLeft="10" paddingRight="10">
    <mx:Label width="100%" color="blue"
    text="Select a row in the DataGrid control."/>
    <mx:DataGrid editable="true" id="dg" width="50%"
    height="60%"
    itemEditEnd="Alert.show('hi')" doubleClickEnabled="true"
    doubleClick="dg.editable=true" rowCount="5"
    dataProvider="{employees}">
    <mx:columns>
    <mx:DataGridColumn id="nam" dataField="name"
    headerText="Name"/>
    <mx:DataGridColumn dataField="phone"
    headerText="Phone"/>
    <mx:DataGridColumn dataField="email"
    headerText="Email"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Form width="100%" height="100%">
    <mx:Text text="Employe Details" fontSize="18"/>
    <mx:FormItem label="Name :">
    <mx:Label text="{dg.selectedItem.name}"/>
    </mx:FormItem>
    <mx:FormItem label="Email :">
    <mx:Label text="{dg.selectedItem.email}"/>
    </mx:FormItem>
    <mx:FormItem label="Phone :">
    <mx:Label text="{dg.selectedItem.phone}"/>
    </mx:FormItem>
    </mx:Form>
    </mx:Panel>
    <mx:Script>
    <![CDATA[
    private function init():void{
    var name:String=nam.dataField;
    Alert.show("values: "+name);
    ]]>
    </mx:Script>
    </mx:Application>
    Thanks in Advance,
    Premdas.

    This code may help:

  • How to get the selected values from a selectmanylistbox?

    Hi ADF Experts,
    <af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb2"
                            value="#{viewScope.TestBean.lovValue}"
                      autoSubmit="true"      valuePassThru="true">
        <f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
                       binding="#{viewScope.TestBean.selectedItems}"/>
      </af:selectManyListbox>
      <af:commandButton text="get selected values" id="cb3"
                        actionListener="#{viewScope.TestBean.getSelectedValues}"
                        partialSubmit="true"/>
      private List<String> lovValue;
      private List<SelectItem> actualList;
    //getters and setters
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
        for (String selectedItem : lovValue) {
            System.out.println("Selected item: " +selectedItem.); // this is giving 1 and 3 like this. how to get the checked values as I'm getting only the indexes. In this scenario I am populating the list programmatically.Just I wanted to know how can we get the selected values(not indexes). Please suggest.
    Thanks-
    Abhijit

    Hi Timo,
    As I am sharing the page fragment and the Java class. So its my usecase I have mentioned below
    I am sharing the jsff page fragment and java class. So that it wud be of help to others.
    jsff page fragment
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
              xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
              xmlns:f="http://java.sun.com/jsf/core">
            <af:panelGroupLayout id="pgl1">
              <af:commandButton text="Search"  id="cb1"
                                actionListener="#{viewScope.TestBean.searchSupplier}"/>
    </af:panelGroupLayout>
        <af:popup id="p1" binding="#{viewScope.TestBean.searchSupplierPopup}">
              <af:dialog id="d2"
                         type="none">
               <af:table value="#{bindings.Contacts.collectionModel}" var="row"
                      rows="#{bindings.Contacts.rangeSize}"
                      emptyText="#{bindings.Contacts.viewable ? 'No data to display.' : 'Access Denied.'}"
                      fetchSize="#{bindings.Contacts.rangeSize}"
                      rowBandingInterval="0"
                      binding="#{viewScope.TestBean.tsupportIssues}"
                      filterModel="#{bindings.ContactsQuery.queryDescriptor}"
                      queryListener="#{bindings.ContactsQuery.processQuery}"
                      filterVisible="true" varStatus="vs"
                      selectionListener="#{bindings.Contacts.collectionModel.makeCurrent}"
                      rowSelection="multiple" id="t1">
              <af:column sortProperty="name" filterable="true" sortable="true"
                         headerText="#{bindings.Contacts.hints.name.label}" id="c2">
                <af:outputText value="#{row.name}" id="ot1"/>
              </af:column>
              <af:column sortProperty="email" filterable="true" sortable="true"
                         headerText="#{bindings.Contacts.hints.email.label}"
                         id="c1">
                <af:outputText value="#{row.email}" id="ot2"/>
              </af:column>
            </af:table>
          <af:commandButton text="OK" id="cb5" partialSubmit="true"       actionListener="#{viewScope.TestBean.testMethod}"/>
          <af:commandButton text="Cancel" id="cb6"
                            actionListener="#{viewScope.TestBean.cancelPopupSearch}"/>
        </af:dialog>
            </af:popup>
      <af:selectManyListbox label="Label 1" id="sml1" partialTriggers="cb5"
                            value="#{viewScope.TestBean.lovValue}"
                      autoSubmit="true"      valuePassThru="true"
                            binding="#{viewScope.TestBean.prp1}">
        <f:selectItems value="#{viewScope.TestBean.actualList}" id="si1"
                       binding="#{viewScope.TestBean.selectedItems}"/>
      </af:selectManyListbox>
      <af:commandButton text="get selected values" id="cb3"
                        actionListener="#{viewScope.TestBean.getSelectedValues}"
                        partialSubmit="true"/>
      <af:commandButton text="remove selected" id="cb4"
             partialSubmit="true"           actionListener="#{viewScope.TestBean.removeSelectedValues}"/>
    </jsp:root>
    TestBean.java
    package com.demo.view;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.faces.component.UISelectItems;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    public class TestBean {
      private RichTable tsupportIssues;
      private List<SelectItem> lovValue;
      private List<SelectItem> actualList;
      private RichSelectManyListbox prp1;
      private List valuesChoosed = new ArrayList();
      private UISelectItems selectedItems;
      private RichPopup searchSupplierPopup;
        public TestBean() {
        super();
      public void setTsupportIssues(RichTable tsupportIssues) {
        this.tsupportIssues = tsupportIssues;
      public RichTable getTsupportIssues() {
        return tsupportIssues;
      public void testMethod(ActionEvent actionEvent) {
        // Add event code here...
        // For learning purposes - show Select Many Button clicked 
         System.out.println("Select Many Button has been Clicked");
        // // RowKeySet Object can hold the selected rows from a user as follows    
        RowKeySet rksSelectedRows =         this.getTsupportIssues().getSelectedRowKeys();
        // Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows 
        Iterator itrSelectedRows = rksSelectedRows.iterator();  
        // Get the data control that is bound to the table - e.g.
        // OpenSupportItemsIterator    
        DCBindingContainer bindings =         (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); 
        DCIteratorBinding dcIteratorBindings =         bindings.findIteratorBinding("findAllContactsIterator"); 
        // Information from binding that is specific to the rows  
        RowSetIterator rsiSelectedRows =         dcIteratorBindings.getRowSetIterator();   
        // Loop through selected rows  
        int i=1;
        while (itrSelectedRows.hasNext()) {        
          // Get key for selected row    
          Key key = (Key)((List)itrSelectedRows.next()).get(0);  
          // Use the key to get the data from the above binding that is related to the row      
          Row myRow = rsiSelectedRows.getRow(key);         
          // Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces       
          System.out.println(myRow.getAttribute("name"));
          valuesChoosed.add(myRow.getAttribute("name"));
    //        actualList = new ArrayList<SelectItem>();
    //        String j = Integer.toString(i);
    //        actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
    //      i++;
           searchSupplierPopup.hide();
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setLovValue(List<SelectItem> lovValue) {
        this.lovValue = lovValue;
      public List<SelectItem> getLovValue() {
        return lovValue;
      public void setActualList(List<SelectItem> actualList) {
        this.actualList = actualList;
      public List<SelectItem> getActualList() {
        actualList = new ArrayList<SelectItem>();
        if(valuesChoosed.size()!=0){
        for(int i=0;i<valuesChoosed.size();i++){
          actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
        else{
          actualList.add(new SelectItem("1","Select One"));
        return actualList;
      public void setPrp1(RichSelectManyListbox prp1) {
        this.prp1 = prp1;
      public RichSelectManyListbox getPrp1() {
        return prp1;
      public void setValuesChoosed(List valuesChoosed) {
        this.valuesChoosed = valuesChoosed;
      public List getValuesChoosed() {
        return valuesChoosed;
      public void getValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<valuesChoosed.size();i++){
          System.out.println(valuesChoosed.get(i));
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
         for(int i=0;i<this.getLovValue().size();i++){
             System.out.println("Selected Value:"+this.getLovValue().get(i));
      public void removeSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
      public void setSelectedItems(UISelectItems selectedItems) {
        this.selectedItems = selectedItems;
      public UISelectItems getSelectedItems() {
        return selectedItems;
        public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
            this.searchSupplierPopup = searchSupplierPopup;
        public RichPopup getSearchSupplierPopup() {
            return searchSupplierPopup;
        public void cancelPopupSearch(ActionEvent actionEvent) {
            // Add event code here...
            searchSupplierPopup.hide();
        public void searchSupplier(ActionEvent actionEvent) {
            // Add event code here...
            RichPopup.PopupHints hints = new RichPopup.PopupHints();
            searchSupplierPopup.show(hints);
    package com.demo.view;
    import java.util.ArrayList;
    import java.util.Iterator;
    import java.util.List;
    import javax.faces.component.UISelectItems;
    import javax.faces.event.ActionEvent;
    import javax.faces.model.SelectItem;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.view.rich.component.rich.RichPopup;
    import oracle.adf.view.rich.component.rich.data.RichTable;
    import oracle.adf.view.rich.component.rich.input.RichSelectManyListbox;
    import oracle.adf.view.rich.context.AdfFacesContext;
    import oracle.adf.view.rich.event.DialogEvent;
    import oracle.jbo.Key;
    import oracle.jbo.Row;
    import oracle.jbo.RowSetIterator;
    import org.apache.myfaces.trinidad.model.RowKeySet;
    public class TestBean {
      private RichTable tsupportIssues;
      private List<SelectItem> lovValue;
      private List<SelectItem> actualList;
      private RichSelectManyListbox prp1;
      private List valuesChoosed = new ArrayList();
      private UISelectItems selectedItems;
      private RichPopup searchSupplierPopup;
        public TestBean() {
        super();
      public void setTsupportIssues(RichTable tsupportIssues) {
        this.tsupportIssues = tsupportIssues;
      public RichTable getTsupportIssues() {
        return tsupportIssues;
      public void testMethod(ActionEvent actionEvent) {
        // Add event code here...
        // For learning purposes - show Select Many Button clicked 
         System.out.println("Select Many Button has been Clicked");
        // // RowKeySet Object can hold the selected rows from a user as follows    
        RowKeySet rksSelectedRows =         this.getTsupportIssues().getSelectedRowKeys();
        // Iterator object provides the ability to use hasNext(), next() and remove() against the selected rows 
        Iterator itrSelectedRows = rksSelectedRows.iterator();  
        // Get the data control that is bound to the table - e.g.
        // OpenSupportItemsIterator    
        DCBindingContainer bindings =         (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry(); 
        DCIteratorBinding dcIteratorBindings =         bindings.findIteratorBinding("findAllContactsIterator"); 
        // Information from binding that is specific to the rows  
        RowSetIterator rsiSelectedRows =         dcIteratorBindings.getRowSetIterator();   
        // Loop through selected rows  
        int i=1;
        while (itrSelectedRows.hasNext()) {        
          // Get key for selected row    
          Key key = (Key)((List)itrSelectedRows.next()).get(0);  
          // Use the key to get the data from the above binding that is related to the row      
          Row myRow = rsiSelectedRows.getRow(key);         
          // Display attribute of row in console output - would generally be bound to a UI component like a Label and or used to call another proces       
          System.out.println(myRow.getAttribute("name"));
          valuesChoosed.add(myRow.getAttribute("name"));
    //        actualList = new ArrayList<SelectItem>();
    //        String j = Integer.toString(i);
    //        actualList.add(new SelectItem(j, (String)myRow.getAttribute("name")));
    //      i++;
           searchSupplierPopup.hide();
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setLovValue(List<SelectItem> lovValue) {
        this.lovValue = lovValue;
      public List<SelectItem> getLovValue() {
        return lovValue;
      public void setActualList(List<SelectItem> actualList) {
        this.actualList = actualList;
      public List<SelectItem> getActualList() {
        actualList = new ArrayList<SelectItem>();
        if(valuesChoosed.size()!=0){
        for(int i=0;i<valuesChoosed.size();i++){
          actualList.add(new SelectItem(valuesChoosed.get(i), (String)valuesChoosed.get(i)));
        else{
          actualList.add(new SelectItem("1","Select One"));
        return actualList;
      public void setPrp1(RichSelectManyListbox prp1) {
        this.prp1 = prp1;
      public RichSelectManyListbox getPrp1() {
        return prp1;
      public void setValuesChoosed(List valuesChoosed) {
        this.valuesChoosed = valuesChoosed;
      public List getValuesChoosed() {
        return valuesChoosed;
      public void getValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<valuesChoosed.size();i++){
          System.out.println(valuesChoosed.get(i));
      public void getSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
         for(int i=0;i<this.getLovValue().size();i++){
             System.out.println("Selected Value:"+this.getLovValue().get(i));
      public void removeSelectedValues(ActionEvent actionEvent) {
        // Add event code here...
        for(int i=0;i<this.getLovValue().size();i++){
            System.out.println("Selected Value:"+this.getLovValue().get(i));
            System.out.println(this.getLovValue().remove(i));
          AdfFacesContext.getCurrentInstance().addPartialTarget(prp1);
      public void setSelectedItems(UISelectItems selectedItems) {
        this.selectedItems = selectedItems;
      public UISelectItems getSelectedItems() {
        return selectedItems;
        public void setSearchSupplierPopup(RichPopup searchSupplierPopup) {
            this.searchSupplierPopup = searchSupplierPopup;
        public RichPopup getSearchSupplierPopup() {
            return searchSupplierPopup;
        public void cancelPopupSearch(ActionEvent actionEvent) {
            // Add event code here...
            searchSupplierPopup.hide();
        public void searchSupplier(ActionEvent actionEvent) {
            // Add event code here...
            RichPopup.PopupHints hints = new RichPopup.PopupHints();
            searchSupplierPopup.show(hints);
    Thanks,
    A. Abhijit

  • How to get the last day of a month?

    HI,
    I want to know how to get the last day of a month.
    In my JClient form, I tried to get it by using oracle.sql.Date method, that is:
    lastday=oracle.sql.Date anydate.lastDayOfMonth();
    But it does not work. The result is lastday=anydate.
    Why?
    Stephen

    You can use the Calender class...
    Calendar c = Calendar.getInstance();
    and then something like...
    c.add(c.MONTH, 1);
    int dayOfMonth = c.get(Calender.MONTH);
    c.add(c.DAY_OF_MONTH, - (dayOfMonth-1) );
    other usefull functions are:
    System.out.println(" YEAR : " + c.get(Calendar.YEAR));
    System.out.println(" MONTH : " + c.get(Calendar.MONTH));
    System.out.println(" DAY_OF_MONTH : " + c.get(Calendar.DAY_OF_MONTH));
    System.out.println(" DAY_OF_WEEK : " + c.get(Calendar.DAY_OF_WEEK));
    System.out.println(" DAY_OF_YEAR : " + c.get(Calendar.DAY_OF_YEAR));
    System.out.println(" WEEK_OF_YEAR : " + c.get(Calendar.WEEK_OF_YEAR));
    System.out.println(" WEEK_OF_MONTH : " + c.get(Calendar.WEEK_OF_MONTH));
    System.out.println(" DAY_OF_WEEK_IN_MONTH : " + c.get(Calendar.DAY_OF_WEEK_IN_MONTH));
    System.out.println(" HOUR : " + c.get(Calendar.HOUR));
    System.out.println(" AM_PM : " + c.get(Calendar.AM_PM));
    System.out.println(" HOUR_OF_DAY (24-hour): " + c.get(Calendar.HOUR_OF_DAY));
    System.out.println(" MINUTE : " + c.get(Calendar.MINUTE));
    System.out.println(" SECOND : " + c.get(Calendar.SECOND));
    System.out.println();*/

Maybe you are looking for

  • Posting an Excel file to a FTP Server

    Hi, I have a requirement, where I have to convert the contents of an internal table to an excel file, along with header details and put that file to a FTP Server. I am able to create an excel file in FTP server, using function module FTP_R3_TO_SERVER

  • 10.2.3   G4  ERASE & RESTORE can`t reboot from CD-ROM

    In advance thankyou for any help I want to give my old G4 to my mother-in-law. Lucky lady! So I would just like to reinstall the OS from scratch and remove anything else. 1/ When I put in CD-ROM push power button and hold C. I get a window asking me

  • Getting new ipod--can I get my songs off of iTunes?

    My old mini has died and I think I am going to get a nano to replace it. My question is will itunes let me get all my songs to put them on my new nano? They must have some way of doing this since I can't be the only one to ever get a new device and t

  • How to best import existing audio files into iTunes?

    Hello, In sum, my question is:  What is the difference between adding music to iTunes Library by the following methods: Placing the audio files in the 'Automatically Add to iTunes' Folder; Dragging the files from my hard drive to the Source Pane in i

  • Missing/Disappearing Files

    I had some of my .NEF photo files highlighted and something happened to where over 100 of them disappeared (even images that were not highlighted). They are not in the trash. I searched some of the specific file names and they are not showing up in t