Bean properties get/set methods, javascript interpretation

I’m starting to play around with the various subclasses of JComponent beans provided by servoy.

I’ve noticed an inconsitancy in the way calls to beans are interpreted versus calls to plugins.

If my plugin has two methods:
void js_setProperty(String prop) and String js_getProperty()

…Then servoy will allow javascript code to reference the property as if it were a public field, i.e. object.property. This makes sense to me.

But if I use a Component bean, say JLabel, then the inherited property, visible, will appear as a property in the method editor. But if I move the code ```
elements.bean_99.visible = true

"javax.swing.JLabel has no public instance field or method named visible"

If this is the case, then **why are bean properties displayed as fields instead of get/set methods?**

or...**Why isn't the javascript code interpreted to call the get/set methods in the same way it does for plugins?**

Sorry for taking this old post back, but I’m having the same “problem” :

I’m developping a bean with a BeanInfo class to described exposed properties. The properties are visible in the Servoy designer, but I can’t access them from javascript code.

My question is, what make a property visible in the editor and not accessible from the code, or, how to make a property accessible from the code ?

I found the answer myself : it’s because my bean had some methods that began with “js” and that totally confused Servoy :!: