Hi Paul,
         
>>
I have created various client side component extensions. I now need to
retrieve an Image from the client side components. this will be used as a
print screen or to display in a seperate screen as a preview.

For this reason I would like to call a client side method which will
return an Image. I have seen documentation on calling client side methods,
but none for calling methids that return a value. How do I do this?
>>

Please see ULC Extension Guide. You can use invokeUI (call client method
from server) and invokeULC (call server method from client). Both of these
methods take Object [] as parameter in which you can put the values you
want to exchange.

In your case to send value from client to server, in your client side
proxy you can put a call back to server:

On client proxy MyUIWidget:

public void clientSideMethod(...) {
      Type value = getValueToBeSentToServer();
        invokeULC("serverSideMethod", new Object[]{ value });
} 

On server proxy MyULCWidget:

public void serverSideMethod(Type value) {
        //Process value here.
}

button.addActionListener(new IActionListener() {            
     public void actionPerformed(ActionEvent event) {
       myULCWidge.invokeUI("clientSideMethod", new Object[]{ arg objects
here });
     }
});
  

Note that Type should be serializable i.e. it should have a Coder (see
IStreamCoder and the ULC Extension Guide).

Thanks and regards,

Janak

-----------------------------------------
Janak Mulani

email: [email protected]
url: http://www.canoo.com <http://www.canoo.com/> 

Beyond AJAX - Java Rich Internet Applications

http://www.canoo.com/ulc
----------------------------------------- 

 


________________________________

        From: [email protected]
[mailto:[email protected]] On Behalf Of Paul Harrison
        Sent: Monday, April 20, 2009 2:51 PM
        To: [email protected]
        Subject: [ULC-developer] Retrieving vaues from a client side
component.
        
        
        Hi 
         
        I have created various client side component extensions. I now
need to retrieve an Image from the client side components. this will be
used as a print screen or to display in a seperate screen as a preview. I
have the code that can generate an Image from an AWT component but
obviously this has the be done on the client side. For this reason I would
like to call a client side method which will return an Image. I have seen
documentation on calling client side methods, but none for calling methids
that return a value. How do I do this?
         
        Paul

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

Reply via email to