A little question for any Rhino gurus out there. Assuming you have a Javascript prototype defined like this (and assuming this is sensible, since my knowledge of JS is quite limited):

function PropertyHello() {
        this.message = "hello world";
}

PropertyHello.prototype.sayHello = function() {
        return this.message;
}

would it be possible to have the 'message' property be accessible via regular Java reflection. In other words, would it be possible to have this prototype behave like a Javabean:

public class PropertyHello {
  private String message = "hello world";
  public String getMessage() { return message; }
  public void setMessage(String m) { message = m; }
}

In my case, the getter and setter methods would be called via reflection.

        Ugo

--
Ugo Cei - http://beblogging.com/

Attachment: smime.p7s
Description: S/MIME cryptographic signature



Reply via email to