Jcombobox Bean

Hi,

I have been struggling with the following the whole morning. I seem te be stuck.

I have to JComboBox beans places on my form. The first combobox is filled with groupnames of clients. When I select one group, I want the other combobox to be filled with the names of the clients within that particular group.

I have found some information about handling events in the bean Jcombobox but have no idea where to put it in the editor. I can put some script in a method but methods cannot be called from a bean.

I have seen two properties called action and actioncommand. I have no idea if I should use them or how I can use them.

Wouter

but methods cannot be called from a bean

That is certainly not true, otherwise my beans would be useless :) But you can not use js methods and events ‘out of the box’ with a standard bean. You need to make them aware of Servoy. Let the bean know about the method and listen to the event for the method to fire.

So basically you have to create a wrapper for the JComboBox.

Thank you. Is there any documentation that can help me make my own wrapper around an existing bean?

Not that I know of. The document about creating a plug-in will help you understanding the plug-in architecture but further it is up to you :)

Maybe one step back: Why are you using the JcomboBox bean and not Servoy’s JComboBox?

Paul

I did not know there was such a thing a the Servoy’s JCombobox. Where can I find it?

I found it. And I am very grateful to you!

This saves me lots of work!

Wouter