Hi Janak,
sorry, but somehow I don't understand how this can help to achieve what I
need:
1. Register a Runnable that will be called on the next request on the
server.
2. Process all other events/requests on the server
3. Return to client
4. Process requests/method calls on client
5. Return to server without any need for user interaction
6. Call the formally registered Runnable.
ULCSession.invokeLater only calls the Runnable at the end of this server
roundtrip. So it doesn't really help here. OK, I can send a message to the
client, but what kind of message should that be? Is there some standard
message that will force a roundtrip?
RoundTripListener won't help here either.
I'll try to implement an extension that doesn't have a visual part. It
shouldn't be that hard. I had only thought that such a functionality must
have been asked for before and would be a standard part of ULC.
Anyways: thanks for answering
Robert
----- Original Message -----
From: "Janak Mulani" <[EMAIL PROTECTED]>
To: "ulc rbeeger" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 31, 2006 1:41 PM
Subject: RE: [ULC-developer] How to force a client roundtrip?
Hi Robert,
You cannot force a roundtrip from the server, all roundtrips are initiated
from the client. To "force" a roundtrip, you can make use of the polling
timer.
However on the server side, you could use ULCSession.invokeLater(Runnable
runnable) and IRoundtripListener.
ULCSession.invokeLater(Runnable runnable) - during a roundtrip (on the
server), it will process the runnable after processing all the requests
from
the client and before returning to the client. In this you can send a
message to the client that will force it to initiate a roundtrip that will
invoke the desired server side method.
IRoundtripListener - can be used to find out on the server when the
roundtrip started and when it ended i.e. after all the requests from the
client and all the invokeLaters have been processed.
I hope this helps.
Thanks and regards,
Janak
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of ulc rbeeger
Sent: Monday, August 28, 2006 7:23 PM
To: [EMAIL PROTECTED]
Subject: [ULC-developer] How to force a client roundtrip?
Hi!
Is there a way to force a client roundtrip from the server?
We'd like to be able to do something like that:
// do something that changes the GUI
ApplicationContext.invokeLater(new Runnable()
{
public void run()
{
// again do something
}
}
);
For us it's totally irrelavant whether the method is on the
ApplicationContext or what its name is. The one important feature is that
as
soon as the request returns to the client, it processes all method calls
that were accumulated on the server and returns to the server to call the
Runnable without any user interaction in between.
The context for this is the following: We have implemented a method
editCellAt(ITableTreeNode node, int column) on our TreeTable in such a way
that it finds out what row the node is in on the table and then send a
call
to editCellAt(int row, int column) on the table of the treetable on the
client. That only works when the node is already visible on the client. So
it doesn't work in a scenario where we add a fresh node to a tabletree and
start the editing of a cell of that node without a
client-server-roundtrip.
Cheers,
Robert
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer