cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Rhino beans
Date Thu, 30 Sep 2004 09:42:09 GMT
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 


Ugo Cei -
View raw message