Pushing data from server into client's JTable

Hi!
Here is the scenario:
Server updates a clients HashMap. Then the TableModel should update it's own data from that HashMap and update its JTable. The user can add/remove/edit rows in the JTable which should update the HashMap too.
Questions:
1. Does the TableModel for each update need to create a Object[][] and create a new JTable whenever the HashMap has changed? Or can it use the setValue/getValue methods to get and set the data in the HashMap
2. Could the data from the user/server be inserted directly into the HashMap and then calling the tableChangedEvent for updating the TableModel and JTable without extra code?
Thx, for now.
/KK

Hi,
This is a pretty standard thing to have to do when dealing with a Gui in general. Basically any changes anywhere should trigger notification of all interested parties. So that means each table or tree or whatever that contains data that may change should register itself as a listener on the apportiate list. This means that everything that comes from the server should cause all listeners to be notified. Now in a table the best one to notify is the table model not the Gui. You should have your own model not take a default. AbstractTable model is a good place to start. The listener will get updated with something that it knows what to do with. It would be nice if this was the object you are using for your table model(rows) but it sounds like you have to go back to the hashtable to get the object. Then just see if the object is new so add it or exists and update your tablemodel with it. Then do something like
te = new TableModelEvent(this,loop,loop);
fireTableChanged(te);
Well that may not format well here but hope you get the idea. Also you may have to take care to do this on the Gui thread, but I usually wait until I get into trouble before doing that. Anyhow that is pretty easy just take the code create a runnable (abstract type is fine) and throw the offending code into the run() and usually do an InvokeLater since you may be on the Servers thread (JMS , Tibco) and do not want to wait.
Howie

Similar Messages

  • How to push data from BW into SAP R/3 system???

    Hello,
    We have faced a problem. We need to push compressed sales data from BW to SAP R/3 system. But We don't know how to do it.
    Does it exist the standard instruments for it (without ABAP development)?
    How to integrate BW and SAP system?
    We will be much obliged you for your recomendations and advices.

    Hi Igor,
    I'm not aware of any standard out of the box mechanisms for moving Sales data back into SAP ERP. There are some delivered "retractors" for business scenarios like financial planning and consolidations where updated data is sent back to SAP ERP in a closed loop scenario. These retractors have been written in ABAP.
    I would suggest that you search the latest BI content to see if there is anything for sales data retraction. There might also be information in SAP note on how to do this in code.
    To send data from BI, you can also use the 'open hub' feature to extract the BI data to a DB table or file for example. This could then be read by a program to load SAP ERP. The loading would have to be custom development.
    Sorry I can't help you more - I fear you will most definitely have some custom development in this case.
    Cheers,
    Mike.

  • FileDownload, downloading data from Server to Client/Share

    Hello together,
    my Web Dynpro Application shall save 4 Files to the client or to a share.
    If the User presses SAVE DATA on the application, the data should be saved in a table (this is already done) but also the new and the old data should be saved in 4 Files on the client or share, without pressing any other Buttons or something else.
    This new and old data are divided in 4 Files. I already did the file Download with a Button, and on the browser there comes a popup and i can save this files - > but this is not what it should.
    Can somebody please HELP?
    Regards Chris

    Remember you are in a web browser, not a desktop application.  There is a security sandbox that protects the client machine from web browser access.  The only way you are going to get slient downloads of multiple files in Web Dynpro is with the AcfUpDownload UI element in 7.01 and higher. It uses a signed Java Applet to get around the browser security sandbox.
    You sya you need to write this to the clietn or to a share.  Is the file share accessible from the file system of the ABAP application server?  If so you might have a much easier time writing the files to the file share via normal ABAP Dataset commands. This won't involve the browser at all since the ABAP application server will write directly to the file share.

  • Stream of data from server to client, what is a good form

    I am building a small client server app where the server is constantly sending data to the client. The data is such that it readily lends itself to being in key/value pairs. My thought is to basically have the server send out a string of text to the client like "1:name, 2:age, 3:date, 4:salary" and then have the client parse it out. I can have an object, and just make a toString() method that spits out the fields in that way. But...
    Do you guys think this is a good way of sending data out. I will only have at most 20 clients running at once, and the data will get no more than say, 50 key/value pairs. Another way I suppose is to convert it to XML, I'd have to read more about it because I'm not exactly sure how to encapsulate data into XML format or how to use Java's DOM API, but perhaps that is overkill, what do you guys think. Also is there an existing Java parsing API out there already, somethign that I haven't found, that would make all of this very easy? As of right now I have to make sure my output stream is in good form, and then still the client will have to do some kludging parsing with commas and what not. Any suggestions would be appreciated.

    Today you only want a few key/value pairs but tomorrow you will decide you need a more complex data structure. I would probably use Serialization using ObjectInput/OutputStream or, as you have considered, XML.
    If both sides are to be written in Java then I would probably use Serialization.

  • How to get and maintain Http persistent connection to get pushed data from

    At MangoSpring ,www.mangospring.com we are working on application which uses IMPS protocol where we always required to receive data pushed by server.
    To achive this we'll have to maintain one persistent Http connection on client side, so that we can be notified whenever some data is pushed by server.
    Reply With Quote

    our problem is :: " How to get and maintain Http persistent connection to get pushed data from Server "

  • Push Data From Sql server 2012 (Express) to Sql Server 2012 (Standard) (i.e. Client to Server)

    Hi all,
    I’m new to this new idea /task/work.
    My Idea: To push data to server (Sql Server 2012 Standard or Enterprise Edition).
    What I’m having? :
    1.A server pc (Windows  Server 2012 + Sql Server 2012 Standard or Enterprise Edition installed).
    2.Two or three Client pc in number (lets us say Windows Server 2012 + Sql Server 2012 with Express Edition installed).
    3.These 3  machines (1 server + 2 client pc) are in communication with one and another(LAN).
    4.Assume that, I'm having one database let us say “Company_DB” with single table “Tbl_Employee”(as of now) in server and similarly in both reaming client PC too.
    i.e.
    Server is having Company_DB (Database), is having table Tbl_Employee
    Client A is having Company_DB (Database) , is having table
    Tbl_Employee
    Client B is having  Company_DB (Database) , is having table
    Tbl_Employee
    What I did ?:
    Step 1: Suppose that, today I entered/created  10 employee details in Client A (say 1 to 10).
    Step 2: On the next day, I created some more employees (say 5 employees i.e 1 to 5)
     in Client B.
    What I need?
    I need to push/send/store these records (i.e. total 15 employees details) should be present in my SERVER PC.
    I googled for the same, found some suggestions like SSIS or
    Import/Export wizard etc…
    How can I achieve this?, and this should happen for some regular intervals like 3/5 hours without any duplicate data.

    sounds like Merge replication to me
    http://www.databasejournal.com/features/mssql/article.php/1438231/Setting-Up-Merge-Replication-A-Step-by-step-Guide.htm
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Pulling data from oracle into sql server 2005

    hi,
    these days i am working on sql server 2005 on windows server 2008 64 bit.
    and oracle 10g on 32 bit unix.
    my problem is that when i am pulling data from oracle into sql server it shows me about *500-700 entries less*.
    why this is happening? is it because 32 bit to 64bit? or is it because of different os?

    Akki,
    are you using snapshot or replication from MSSQL? I am doing the same thing, hope to share your experience.
    I am using import/export from MGT studio and pull some data from Oracle database, I am working on how to update the changes on these tables pulled from Oracle.
    Thanks,
    -hank

  • Confused How to push Data from Oracle DB Tables into Hyperion Planning?

    HI
    I m Newbie to ODI. My DataSource is Oracle 11g Database (HR Tables) and my Target is Hyperion Planning.
    I successful imported Oracle DB HR tables into ODI and Hyperion Planning Dimensions Like(Employee) but i dont understand in " ODI Interface" how i am going to do Mapping between Oracle tables and Planning application Dimension, am i doing wrong way?
    I am confused if i have to push Data from Oracle 10g HR Tables into Hyperion Planning am i following right approach ?
    Looking for your guideline...
    Regards
    Sher

    Hi John
    Well i have working knowledge in ODI, i did whole complete cycle and i did customization project for Oracle EBS to Data warehouse though ODI.
    What, I am NOT able to figure out How to LINK Hyperion Planning Outline to Oracle EBS HR Tables. cause in Hyperion Outline i m able to view Dimensions Not particular Column to map with EBS HR Table (column).
    Eample:
    In EBS HR we have Employee Number in Per_all_people_f but in Hyperion Planning Dimension is ONLY Employee.
    Your response highly appreciated.
    Chreeez
    Sher

  • Clarification on details regarding getting data from APO into BW

    Hi Friends,
    I need some clarification in terms of getting data from APO into BW for reporting:
    I observed that SAP has provided standard data flows for PPDS module, where as for the Demand Planning and Supply Network Planning SAP has just provided some standard InfoCubes ex: 0APO_C07, 0APO_C10, 0APO_C11, 0APO_C12.
    Which makes me believe that for Demand Planning and Supply Network Planning we need to generate DataSources from the Planning books in DP & SNP and build our own custom data flows. In that case what is the use of above mentioned InfoCubes provided by SAP?
    Also in my current project the client has built a custom DataSource on top of a Planning Book in DP and created custom data flow in BW for reporting and also created a Back up cube in APO.
    My question on this is, what is the use of this Back up cube in APO, what is the need to maintain two same cubes in two different systems?
    My next question is, I have installed complete data flow for 0APO_C02 (Orders Data) in BW and loaded data. In SAP documentation it says when we try to load data for a particular date range using this InfoSource (0APO_PPDS_ORDER_01), it directly loads data from the live cache.
    Is there a way to know if the data is coming from Live Cache or from APO server, can we get data from live cache for 9A*** Datasources also, which we create on planning books in DP and SNP?
    Any comments and Info will be greatly appreciated. Thanks!

    Hi Sunitha, thanks for your inputs. So does that mean for Demand Planning and Supply Network Planning, SAP has not given any standard DataSources because it makes more sense to build DataSources from the planning books as each company has their own planning strategies based on how they do there business. Right?
    And for these modules there is no other way rather than generating DataSources from Planning Books and build the Data Flows based on it. Right?
    Also these generated DataSources i.e. 9A**** pull data from live cache itself right or is there any setting that we need to enable for it to get data from live cache?
    Thanks again for your valuable inputs hope to get answers to above questions as well.

  • Move files from server to client

    I have create txt file in server directory using UTL_FILE package,
    and I put in the directory in server.
    Server platform is linux. and client platform in Windows.
    What I want to ask is there any possibilities to copy that file from server to client using pl/sql ? could all of you "The Gurus" give me a script example ?
    Thanks a lot.
    regards,
    indra

    > What I want to ask is there any possibilities to copy that file from server
    to client using pl/sql
    No. Not really.
    Think about it.. the file is on the server. PL/SQL code executes inside the Oracle server session that is servicing the client.
    Just how is PL/SQL (on the server) suppose to reach out and push that file to a client's file system and directory?
    PL/SQL cannot do this. You need something on the client that will accept the file. You need something in-between the client and PL/SQL that will handle the transfer of the file. This something can be ftp, scp, tftp, NetBIOS etc.
    Anyway you look at this, it does not make sense. You are turning the server into the client that needs to push the file. You are turning the client into a server that needs to accept the file.
    Why? This is contrary to the basic client-server RDBMS architecture. You are adding more complexities and more moving parts to the architecture by forcing a swap of client and server roles. The are now a far greater likelihood of errors and bugs and failures.
    It does not make sense to do it this way.
    What is the business requirement you are trying to satisfy? Instead of us trying to help you to hack a flawed solution, let us rather assist you in determining the correct and proper solution.

  • Need to Push data from BI to XI

    Hi Experts,
    We have a requirement to push data from BI to XI(using Open Hub).
    we found some document, in which excute method is selecting from specific open hub table,
    we have more than 5 open hub destinations to send data to XI.
    do i require to create like this 5 classes or do u have another other method  to create one class
    and use it for all objects.
    this is the sample code, which give hardcoded open hub name.
    DATA:
    lt_data TYPE zpushdbpush_table_datarow_tab,
    ls_data TYPE zpushdbpush_table_datarow,
    ls_applid TYPE zpushdbpush_table_process_id,
    l_db_line TYPE /bic/ohnwl_oh_xi,
    l_db_tab TYPE TABLE OF /bic/ohnwl_oh_xi.
    SELECT * FROM /bic/ohnwl_oh_xi INTO TABLE l_db_tab.
    LOOP AT l_db_tab INTO l_db_line.
    CLEAR ls_data.
    MOVE-CORRESPONDING l_db_line TO ls_data.
    APPEND ls_data TO lt_data.
    ENDLOOP.
    Thank You.
    Manjula.B

    Hi Manjula,
    I'm implementing that soluction... Have you?
    Now I'm having problem with the code when says:
    lt_data TYPE zpushdbpush_table_datarow_tab,
    ls_data TYPE zpushdbpush_table_datarow,
    ls_applid TYPE zpushdbpush_table_process_id,
    So, when activating that code does not generate... The system return error informing that the TYPE zpushdbpush_table_datarow_tab does not exist... can you help me on that?
    With ANY kind of information?
    Thanks!
    Best regards,
    Demétrius

  • Push data from BW 3.5 to XI 3.0

    Hi SDN,
    I have to design an interface to push data from an Infospoke of BW to XI which does the necessary mapping and forwards it to a FTP server.
    I am using ABAP proxies to communicate with BW. Can somebody suggest me the approach to push data from BW to XI based on some selection criterion...What sort of development it requires on BW side in order to push the data to XI.

    Siva Devireddy.
    Check this Link
    https://www.sdn.sap.com/irj/sdn/search?searchvisible=false&selectedcustomprops=sdn_product(value=Exchange%20Infrastructure),sdn_product_release(value=3.0)&SearchPluginName=sdn_library.
    Thanks
    sat

  • How do we retrieve data from SO10 into smart form?

    Hello Experts,
    Could you pls help me out in extracting data from SO10 into smartform.And how do we create a check box in a smartform(The check box should be always checked).
    Thanks and Regards,
    Shilpa

    Hi Shilpa,
       You can create Check Box using a Table with 1 cell only with border.
       To get data from SO10 - standard text use:
        CALL FUNCTION 'READ_TEXT'
            EXPORTING
              client                  = sy-mandt
              id                      = ws_id
              language                = ws_language
              name                    = ws_name
              object                  = ws_object
            TABLES
              lines                   = i_tline1
            EXCEPTIONS
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              OTHERS                  = 8.
          IF sy-subrc <> 0.
          ENDIF.
    Reward points if this helps.
    Manish
    Message was edited by: Manish Kumar

  • How to push data from primary mdf file to seconday ndf files

    how to push data from primary mdf file to seconday ndf files
    rathnakar

    I'd try them over here.
    SQL Server forums on MSDN
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • How to provide a button in bsp that downloads data from SAP into powerpoint

    hi,
    how to provide a button in bsp that downloads data from SAP into powerpoint
    this absurd requirement is needed by my client.
    thanks
    saad

    Hi,
    Look at tools like the things mentioned above or things like
    http://www.investintech.com/products/developer/creatorsdk/creatorsdkmain/
    http://command-line-image-converter.qarchive.org/
    You need to look for tools that can run via the command line and thsu be executed as external command (http://help.sap.com/saphelp_nw2004s/helpdata/en/fa/0971d4543b11d1898e0000e8322d00/frameset.htm)
    Eddy
    PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!

Maybe you are looking for

  • Lots of blank space when printing array with only last element printed

    I have a slight problem I have been trying to figure it out for days but can't see where my problem is, its probably staring me in the face but just can't seem to see it. I am trying to print out my 2 dimensional array outdie my try block. Inside the

  • How to bold/color text message in Module pool Programming ?

    Hi All , I need to bold /color a message in module pool . this message will come when certain conditions satisfied , currently this text message is displaying through variable . I Refereed program DD_STYLE_TABLE , but still not getting desired output

  • Commitment Item in SD Billing document (Fund Managment) ECC6

    Hi, We are upgrading from 4.6C to ECC6 and have activated Fund Managment (EA-PS). At the time of carrying out the Billing in SD we are getting a error that no commitment item available for gl account but if I use the same revenue account and create a

  • I bought an Iphone 4 on the 7th of September 2010.

    I bought an Iphone 4 on the 7th of September 2010. At that time there were no unlocked phones, so I had to buy the locked one during my visit to the US. And it was without a contract from AT&T. Please can you help me unlock my phone

  • Trying to reactivate an original iPhone after reseting it

    I recently upgraded to a 4s from an original 3 iPhone (non "G").  I had reset the 3 phone and wiping the info clean, stupidly thinking I was trading it in, but decided to keep it to make it just an iPod for my daughter.  Now when I hook it to iTunes,