How to get source from ListSelectionListener on Table?????????

hi there
i have about three JTables in my application, i have added ListSelectionListener to these tables to see if any selection was made on them.
Table1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
ListSelectionModel rowSM = Table1.getSelectionModel();
//add listener to the table selection
rowSM.addListSelectionListener(this);
in the ValueChanged() method, i need to get the selection made on these tables.
public void valueChanged(ListSelectionEvent e)
how do i find out on which table the selection was made?
thank you.

ListSelectionEvent.getSource(): returns an object. Check its type with instanceof :
if(e.getSource() instanceof JTable)
JTable sourceTable=(JTable)e.getSource();
... off you go...
}

Similar Messages

  • How to get data from crosstab or table?

    hi !
    i develop my app with bib 9.0.3.1 . To customize my report,i must get data from crosstab or table component (presentation bean) and generate defined XML file ,can you tell me how to do ?

    hi paul
    the sample code like this:
    try{
         DataAccess dataAccess = thinDataview.getModel().getDataAccess();
    int rowCount = dataAccess.getEdgeExtent(DataDirector.ROW_EDGE);
    int colCount = dataAccess.getEdgeExtent( DataDirector.COLUMN_EDGE );
         for ( int i=0; i<rowCount; i++ )
         for( int j=0; j<colCount; j++ )
                   String dataValue = dataAccess.getValue( i,j,DataMap.DATA_UNFORMATTED).toString();
    }catch( Exception e ){
    System.out.println( e.getMessage() );

  • How to get data  from an internal table in some other program

    I would like to get data from the internal table in the other program. When I using FM "LIST_FROM_MEMORY" to get the data, it doesn't work and the exception is not fount.
    If any special code need in the other program, like write data to memory .
    Many thx .
    From Ross Wang

    Hi
    <li>You need to have interaction if you want to use EXPORT/IMPORT statments.
    <li>The internal tables in both programs must be same
    <li>Program one ..Calling program
    REPORT ZTEST_NOTEPAD.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SUBMIT ztest_notepad1 AND RETURN.
      IMPORT it_t001 FROM MEMORY ID 'ZTEST_T100'.
      LOOP AT it_t001.
        WRITE:/ it_t001.
      ENDLOOP.
    <li>Program two ...Called program
    REPORT ztest_notepad1.
    DATA: BEGIN OF it_t001 OCCURS 0,
            bukrs TYPE t001-bukrs,
            butxt TYPE t001-butxt,
          END OF it_t001.
    START-OF-SELECTION.
      SELECT * FROM t001 INTO CORRESPONDING FIELDS OF TABLE it_t001 UP TO 10 ROWS.
      IF sy-dbcnt > 1.
        EXPORT it_t001 TO MEMORY ID 'ZTEST_T100'.
      ENDIF.
    I hope that it gets you some idea.
    Thanks
    Venkat.O

  • How to get data from hierachy lookup table

    there is a hierachy lookup table A, and I want to get data from A.
    but the following code does work properly:
    WebTreeNode result = catalog..GetHierarchy(tableName,nodeID);
    could anybody give some suggestion or solution of getting data from hierachy lookup table,
    3x

    Hi fei,
    Please look at the following code.
    I hope it will give you some clues...
    private void showHierarchy() throws StringException
        ResultSetDefinition rsd = new ResultSetDefinition(<code name of your hierarchy table>);
        rsd.GetFields().Add(<code name of a field in your hierarchy table>);
        Search search = new Search(<code name of your main table>);
        WebTreeNode treeNode = catalogData.GetResultTree(search, rsd, 0);
        printHierNameRecursive(treeNode, 0);
    private void printHierNameRecursive(WebTreeNode root, int level) throws StringException
        WebTreeNodeArray arr = root.GetChildren();
        for (int i = 0; i < arr.GetSize(); i++)
            for (int tab = 0; tab < level; tab++)
            System.out.print("t");
            String catName = arr.GetWebTreeNodeAt(i).GetValueAt(<code name of a field in your hierarchy table>).GetStringValue();
            System.out.println(catName);
            printHierNameRecursive(arr.GetWebTreeNodeAt(i), level + 1);
    Regards,
    Nir

  • How to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c

    i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables

    check if this helps:
    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • OC4J - How to get data from large table (more than 9 million rows) by EJB?

    SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS
    O I use Jdeveloper to create EJB that has finder methods to get data from a big table (more S than 9 million rows). Deploy is OK but when run client program I always get timeout
    O error or not enough memory error,
    S Can any one help me?
    O urgent
    SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS SOS

    Your problem may be that you are simply trying to load so many objects (found by your finder) that you are exceeding available memory. For example if each object is 100 bytes and you try to load 1,000,000 objects thats 100Mb of memory gone.
    You could try increasing the amount of memory available to OC4J with the appropriate argument on the command line (or in the 10gAS console). For example to make 1Gb available to OC4J you would add the argument:
    -Xmx1000m
    Of course you need have this available as hard memory on your server or you will incur serious swapping.
    Chris

  • I want to get data from only RESB table without loss of any deltas

    i have to fetch the reservation details for the production orders.
    we are using descrete manufacturing method to keep track the Work in process and cost .
    for addition of components manually in the production order we can track thru change date i.e From AUFK table with field name AEDAT. for each time when we are adding the components the system will create a new line item In tableRESB-OBJNR(field)
    i need very few fields from RESB table to be pulled into SAP BW.
    how should i proceed creating a generic exractor without any loss of deltas.
    i want to get data from only resb table into sap bw.
    how should i proceed with Generice extractor with single table RESB and what would be the delta field . could any one throw some light .
    all answers would be rewarded with points

    I have few reports for BOM data is to be pull into bw
    all the reports contain the same tables Mentione below
    MAST- material to BOM LINK
    STKO- BOM header
    STPO- BOM ITEM
    STAS- BOM ITEM SELECTION
    how should i create ageneric datsource satisfying that all the data comes from these tables without fail of deltas,
    my doubts.1. Do i have to create a separate data sources (generic) for all these individually and load into separate ODS'S AND CLUB THEM into single ODS further.?
    if i create i dont know what should be delta field that has to be picked for each datasource
    2. Do i have to create a view on all these tables and create a generic datasource.if created what would be the delta field i have to select.
    could you pls let me know how should i pull the data without loosing any deltas
    could you pls let me know the flow with delta fields mentioned
    regards,
    P

  • How to move data from a staging table to three entity tables #2

    Environment: SQL Server 2008 R2
    I have a few questions:
    How would I prevent duplicate records, when/ IF SSIS is executed many times?
    How would I know that all huge volume of data being loaded in the entity tables?
    In reference to "how to move data from a staging table to three entity tables ", since I am loading large volume of data, while using lookup transformation:
    which of the merge components is best suited.
    How to configure merge component correctly. (screen shot is preferred) 
    Please refer to the following link
    http://social.msdn.microsoft.com/Forums/en-US/5f2128c8-3ddd-4455-9076-05fa1902a62a/how-to-move-data-from-a-staging-table-to-three-entity-tables?forum=sqlintegrationservices

    You can use RowCount transformation in the path where you want to capture record details. Then inside rowcount transformation pass a integer variable to get count value inside
    the event handler can be configured as below
    Inside Execute SQL task add INSERT statement to add rowcount to your audit table
    Can you also show me how to Check against destination table using key columns inside a lookup task and insert only non
    matched records (No Match output)
    This is explained clearly in below link which Arthur posted
    http://www.sqlis.com/sqlis/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
    For large data I would prefer doing this in T-SQL. So what you could do is dump data to staging table and then apply
    T-SQL MERGE between tables (or even a combination of INSERT/UPDATE statements)
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to get file from server while click on link

    Hi,
    i created on link and i gave one server path to select file from server but while clickinng on link it no displaying any thing.
    following is the Destination url that i gave for the item.
    /u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/
    please tell me how to get file from server while click on link.

    Ok I got your requirement now.
    If you are getting file names from view attribute then you should not be adding destination URI property for the link.
    Instead you can use OADataBoundValueViewObject API.
    Try below code in your controller processRequest method:
    I am assuming that you are using classic table.
    Also in below example it considers OAMessageStyleText and you can replace it with link item if you want.
    OATableBean tableBean =
    (OATableBean)webBean.findChildRecursive("<table item id>");
    OAMessageStyledTextBean m= (OAMessageStyledTextBean)tableBean.findChildRecursive("<message styled text in table item id>");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "/u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/"+"<vo attr name which stores file name for each row>");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    Regards,
    Sandeep M.

  • How to read data from an internal table into a real table?

    Hello experts,
    I'm relatively new to ABAP and I'm trying to figure out how to read data from an internal table into a table that I created.  I'm trying to use the RRW3_GET_QUERY_VIEW_DATA function module to read data from a multiprovider.  I'm trying to read data from the e_cell_data and e_axis_data tables into a table that I've already created.  Please see code below.
    TABLES MULTITAB.
    DATA:
      query_name TYPE RSZCOMPID,
      s_cubename TYPE RSINFOPROV,
      t_cell_data TYPE RRWS_T_CELL,
      t_axis_data TYPE RRWS_THX_AXIS_DATA,
      t_axis_info TYPE RRWS_THX_AXIS_INFO,
      wa_t_cell_data like line of t_cell_data,
      wa_t_axis_data like line of t_axis_data,
      w_corp_tab like line of t_cell_data.
    s_cubename = 'CORP_MPO1'.
    query_name = 'Z_corp_test'.
        CALL FUNCTION 'RRW3_GET_QUERY_VIEW_DATA'
           EXPORTING
             i_infoprovider           = s_cubename
             i_query                  = query_name
            i_t_parameter            = query_string_tab
           IMPORTING
             e_cell_data              = t_cell_data
             e_axis_data              = t_axis_data
             e_axis_info              = t_axis_info.
    If anyone has any information to help me, I would greatly appreciate it.  Thanks.

    Hi,
    <li>Once you call the function module RRW3_GET_QUERY_VIEW_DATA, lets say data is available in the corresponding tables e_cell_data e_axis_data which you have mentioned.
    <li>Modify your internal table defined for other purpose, with data from e_cell_data e_axis_data like below.
    LOOP AT t_cell_data INTO wa_t_cell_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_cell_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    LOOP AT t_axis_data INTO wa_t_axis_data.
      "Get the required data from t_cell_data.
      MOVE-CORRESPONDING wa_t_axis_data TO it_ur_tab.
      "Modify your internal table wih data
      MODIFY it_ur_tab TRANSPORTING <field1> <field2> <field3>.
    ENDLOOP.
    Thanks
    Venkat.O

  • How to get messages from IBM MQ in Oracle.

    Hi ,
    Can you please help me how to get messages from one IBM MQ to another IBM MQ in Oracle.
    My requirement is Our upstream is putting messages from their IBM MQ to our IBM MQ
    then we have to extract data from the message and load into Oracle database tables
    how to implement this  in oracle.
    Is there any other way to implement this without writing any ORACLE PL/SQL programming.
    Please help me.
    Thanks.

    You might want to use Oracle AQ: Integrating Oracle database applications with WebSphere MQ applications You will need to write some PL/SQL to Dequeue from Oracle AQ and convert the queue payload into insert statements.
    If you need help wityh AQ, there is a separate forum: Advanced Queueing

  • How to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    how to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    Make sure Settings > iCloud > Photos > iCloud Photo Library (Beta) = "Off"
    Then sync your iPhone using iTunes and make sure your sync settings for photos are set correctly in iTunes.

  • I got a new computer and don't know how to get music from ipod touch to itunes library

    I recently got a new computer and don't know how to get music from my ipod touch to show on my itunes library. 

    You need to transfer the iTunes folder from the old computer to the new one.
    iTunes: How to move your music to a new computer (Mac or Windows):
      http://support.apple.com/kb/HT4527

  • I have a new MacAir and don't know how to get info from my USB stick and my SD photo card.  Can anyone help me please?

    I have a new MacBook Air and don't know how to get info from my USB stick and get info from my SD card.  Can anyone help, please?

    Plug the stick and/or card into the appropriate slots on the side of your Air. Do you see icons for the devices appear on the desktop? Click into them to see what files are there.
    Matt

  • How to export data from a Oracle table to a delimited file?

    I know how to load delimited file into a table, but how to export
    data from a Oracle table to a delimited file?
    Thanks in advance.

    Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
    solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
    Re: utl_smtp and triggers

Maybe you are looking for

  • HT3702 So how do I get rid of a charge that was made in an app with no app store authorization from the itunes account holder.

    I'm having a problem with a credit card purchase I made through logmein trial version. Granted I'll pay for it now, but the phone should have asked if I would authorize the purchase. So I feel that apple owes me for the mistake and pay up. As manager

  • Alert in BPM not triggered anymore

    Hello, I have a strange behavior in my integration process. I defined an alert category in ALRTCATDEF and in my BPM I trigger an alert using that defined category. This worked fine so far, but after making some non alert-related changes in the proces

  • Messed up non-English text

    I have worked on i18n for several time in various positions. I mess up non English text first time. The followings are the process: 1.Copy translated text from MS word file into a text editor 2. Run the native2ascii -encoding UTF-8 file1.properties t

  • Character Encoding OIM - SPML

    Hello Forum, When I send a SearchRequest to OIM SPML Webservice, OIM returns this: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5 Content-Type: text/xml

  • Business Rules not visible sometimes-via web and smartview

    We use EPM 11.1.2. we have a unique problem-Business rules (associated with forms)sometimes fail to appear either via web or smartview for our users.After logging out and back in,sometimes they appear again. If we explicitly 'disconnect all' from sma