Thanks Janak

That will do the job.

Best Regards
Ernst
 

-----Ursprüngliche Nachricht-----
Von: Janak Mulani [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 16. August 2006 17:33
An: Plüss Ernst, Bedag
Cc: [EMAIL PROTECTED]
Betreff: RE: [ULC-developer] How to find serverside object for a client object

Hi Ernst,

Which version of ULC are you using?

Here you will find the solution to your problem:
http://lists.canoo.com/mailman/private/ulc-developer/2006/003591.html.

It is for ULC 6.0.4 but will work with deprecated methods in ULC 6.1.

It demonstrates how to get current focus owner and within that it shows how
to get UI half object once you have the basic (Swing) component and
subsequently the server side object. Ctrl-P will print the current focus
owner.

I hope this helps.

Thanks and regards,

Janak

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Plüss Ernst, Bedag
Sent: Tuesday, August 15, 2006 8:21 PM
To: [EMAIL PROTECTED]
Subject: [ULC-developer] How to find serverside object for a client object


Hi All
We have the following requirement: Some times we d'like to know, which
GUI-Widget hast the focus.
Solution A:
We could register a focus listener on all Widgets. Everytime the focus
changes we get an event and store the current focus owner.
Unfortunately this causes to much network traffic and a very high server
load, even if we send the focus change event asynchronously.
Solution B:
We track the current focus owner by registering a property listener at the
java.awt.KeyboardFocusManager. This way we get an event for every focus
change on the client side. The problem here is that we don't know how to
find the apropriate server side half-object from the client side object. Is
there a way to lookup an id or something like that for the reference we get
in the PropertyListener of the KeyboardFocusManager? My guess is that once
we have this id we can pass it to the server (by writing a litle extension)
and find the appropriate server side half-object.
I added a Snippet to ilustrate the client side of Solution B.
TIA for all answers.
Ernst Plüss
Bedag Informatik AG
Abteilung GF GBA
Gutenbergstrasse 1
3012 Bern
Telefon:        +41 (0)31 633 21 21 (direkt 633 25 89)
E-Mail:         mailto:[EMAIL PROTECTED]
www.bedag.ch

<<ClientReferenceSnippet.java>>

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

Reply via email to