Results 1 to 3 of 3
  1. #1

    newbie question on adapter

    Hello All,

    I started with this exemple
    but i got a problem with the cursors because the stmt and rs are never closed.
    I ve added them and right now it works fine.

    My first objective is to show the content of two tables on the same Web page. In my table rows are added and deleted. When one row is added in the table in added in the static -grid too, but when it s deleted, the row is still present in the webpage, why?
    If i want to extend the exemple inserting multiple rows into the adapter, how to do that?
    If i want to extend the exemple adding a second statement on another table, what is your suggestion?

    Thanks in advance

  2. #2
    Join Date
    Feb 2012
    Hi Luca,

    I think you should consider at the client side to handle two Items in COMMAND mode with two distinct DynaGrid.
    Please consider this demo,, that shows two grids (the red one and the green one) with the buy and sell proposals for a market stock with price and quantity.
    This is achieved with just two Items in COMMAND mode where the rows of a table can be handled automatically by the add, delete, and update commands. For further details on the COMMAND mode please refer to section "3.2.3 COMMAND Mode" of "General Concepts.pdf" documentation.

    About the Adapter code proposed, it should be intended as very basic POC and in real scenario use it should be heavily developed.
    That said in your case, if the two statements are triggered by two different subscribe requests, then you could simply duplicate the GreetingsThread and change the subscribe method with something like this:

     public void subscribe(String itemName, boolean needsIterator)    
                    throws SubscriptionException, FailureException {    
            if (itemName.equals("greetings1")) {    
                gt1 = new GreetingsThread1(null);    
            }  else if (itemName.equals("greetings2")) {    
                gt2 = new GreetingsThread2(null);    
    Hope that helps.

  3. #3
    Thanks for your suggestion Giuseppe!



Similar Threads

  1. Replies: 9
    Last Post: May 12th, 2016, 02:46 PM
  2. Newbie Java Remote Adapter question
    By webmons in forum Adapter SDKs
    Replies: 3
    Last Post: March 7th, 2013, 09:30 AM
  3. Metadata Adapter Question
    By dalmy in forum Adapter SDKs
    Replies: 1
    Last Post: July 12th, 2010, 09:38 AM
  4. Newbie
    By pisak in forum Client SDKs
    Replies: 1
    Last Post: January 23rd, 2008, 03:10 PM
  5. LightStreamer and Sockets - newbie question
    By jsharpe in forum Adapter SDKs
    Replies: 3
    Last Post: September 28th, 2006, 02:03 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 12:06 AM.