WebOrb/Flex: How to call a method on a RemoteClass returned by a RemoteObject

I have a RemoteObject returning a 'Schedule' class. I've created a client side RemoteClass to map to it. All properties of the class instance are coming in fine. I just not clear on how I go about calling methods on the class. How would I call a setter on startdate?

package classes.remote { [Bindable] [RemoteClass(alias="com.site.data.schedule.Schedule")] public class Schedule {

    public var id:int; 


    public var modifydate:Date;
    public var startdate:Date;
    public var enddate:Date;


}

}

Answers


You cannot invoke methods that are defined on the server class from within a Flex application. AMF only supports serialization of data, i.e. properties or public fields. If you just want to set values to the properties of the object after it's been returned, you set them like any other variable

schedule.startDate = new Date();

I don't really get the question. You can call whatever you want on this class like in every other class, The [RemoteClass] just means you can use this class in communication with the server side. It will be converted to the class you specified. Beware: For example, if you modify your instance of the object in the client side that received from the server side, this won't propagate to the server side, you will have to explicitely transfer it back to the server side. The parameters are passed by value and not by reference between client<=>server. Is it your concern ?


Need Your Help

I am looking for a simple algorithm for fast DCT and IDCT of matrix [NxM]

performance algorithm mathematical-optimization dct

I am looking for a simple algorithm to perform fast DCT (type 2) of a matrix of any size [NxM], and also an algorithm for the inverse transformation IDCT (also called DCT type 3).

How to automatically align comments in different pieces of code?

emacs comments alignment text-formatting

I have to do a very specific task to re-do over and over again and would like to have it put permanently in my .emacs file. But I am not versed enough in emacs-lisp to manage it: