It sounds like you are using a “request” scoped remote object on the server side so for each invocation, it creates a new instance.  Add <scope>application</scope> inside of your destination tag’s properties tag.  The other option is “session” which is one per flex session… typically one per client.

 

Jeff

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of klumikaze
Sent: Thursday, October 12, 2006 10:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: RemoteObject only accesses, cannot set

 

It would appear I somehow figured this out on my own... I have a
feeling it's that I needed to implement the Remote class
(java.rmi.Remote)? Am I right?

Thanks, hope this helps somebody else that's stumped on RemoteObjects.

Brian

--- In [EMAIL PROTECTED]ups.com, "Brian Dunphy" <briandunphy@...> wrote:
>
> Hello,
>
> Just starting to use RemoteObjects, but for some reason my
RemoteObject can
> only retrieve information, it can't use any of the mutator methods in my
> class.
>
> My Java class is as follows:
>
> package com.testing.pojos;
>
> import java.io.Serializable;
>
> public class HelloWorldMessage implements Serializable
> {
> private String message;
>
> public HelloWorldMessage()
> {
> this.message = "Hello World";
> }
>
> public String getMessage()
> {
> return message;
> }
>
> public void setMessage(String newMessage)
> {
> this.message = newMessage;
> }
> }
>
> My RemoteObject in MXML is as follows:
>
> <mx:RemoteObject destination="com.testing.pojos.HelloWorldMessage"
> id="roHelloWorld">
> <mx:method name="getMessage" result="showGetMessage(event)"
> fault="showFault(event)"/>
> <mx:method name="setMessage" fault="showFault(event)" />
> </mx:RemoteObject>
>
> My destination definition is as follows:
>
> <destination id="com.testing.pojos.HelloWorldMessage">
> <properties>
> <source>com.testing.pojos.HelloWorldMessage</source>
> <scope>application</scope>
> </properties>
> <channels>
> <channel ref="my-rtmp" />
> </channels>
> </destination>
>
> I can access the getMessage method just fine (and it returns the
appropriate
> message), however when I call setMessage("new message"), it doesn't
persist
> my message, it simply returns the old "Hello World!" message again.
>
> Something I'm doing wrong?
>
> Thanks,
>
> Brian Dunphy
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to