# Bean properties get/set methods, javascript interpretation

**URL:** https://forum.servoy.com/t/bean-properties-get-set-methods-javascript-interpretation/4458
**Category:** Classic Servoy
**Created:** [June 30, 2005, 11:31pm UTC](https://forum.servoy.com/t/bean-properties-get-set-methods-javascript-interpretation/4458 "2005-06-30T23:31:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![seanthomasdevlin](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/seanthomasdevlin/32/5_2.png) [@seanthomasdevlin](https://forum.servoy.com/u/seanthomasdevlin)
#### Post date: [June 30, 2005, 11:31pm UTC](https://forum.servoy.com/t/bean-properties-get-set-methods-javascript-interpretation/4458/1 "2005-06-30T23:31:24Z")

</div>

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

```into
"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?**
```

---

<div class="post-metadata">

### Author: ![lbalogh](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@lbalogh](https://forum.servoy.com/u/lbalogh)
#### Post date: [January 27, 2006, 9:13am UTC](https://forum.servoy.com/t/bean-properties-get-set-methods-javascript-interpretation/4458/2 "2006-01-27T09:13:50Z")

</div>

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 ?

---

<div class="post-metadata">

### Author: ![lbalogh](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@lbalogh](https://forum.servoy.com/u/lbalogh)
#### Post date: [January 27, 2006, 1:49pm UTC](https://forum.servoy.com/t/bean-properties-get-set-methods-javascript-interpretation/4458/3 "2006-01-27T13:49:17Z")

</div>

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