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,
http://demos.lightstreamer.com/MarketDepthDemo/, 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);
gt1.start();
} else if (itemName.equals("greetings2")) {
gt2 = new GreetingsThread2(null);
gt2.start();
}
}
Hope that helps.
Giuseppe