Hi Robert,

As I said, "push" from server to make the client do something can only be
simulated using ULCPollingTimer.

Please have a look at
http://ulc-community.canoo.com/snipsnap/space/Contributions/Push/Polling+Tim
er

>sorry, but somehow I don't understand how this can help to achieve what I
>need:

However....

>1. Register a Runnable that will be called on the next request on the
>server.

It will be called during the current request after all the requests have
been processed and before sending the response to the client. So in
invokeLater() you can tag in your request athe end of the request queue
generated during the processing of current request.

>2. Process all other events/requests on the server
>3. Return to client

Before you are returning to the client, you are putting in a request for it
to call back.

>4. Process requests/method calls on client
>5. Return to server without any need for user interaction

The callback request that you sent will make sure that client calls back
without any user interaction.

>6. Call the formally registered Runnable.

Well, this need not necessarily be a runnable it could be a some server side
method.

>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
The message to the client could be call-me-back.

>message that will force a roundtrip?

No. But you can make use of IMessageService or...

>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.

You can implement a ULCProxy that sends a request (invokeUI() ) to its
UIProxy which in turn does invokeULC() to call back the server.

I hope this helps.

Thanks and regards,

Janak

>----- 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

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to