[BBB-USERS] Re: Binding a JComboBox
- From: <avital.nahon@gmail.com>
- To: users@betterbeansbinding.kenai.com
- Subject: [BBB-USERS] Re: Binding a JComboBox
- Date: Tue, 19 Jan 2010 18:40:33 +0000 (GMT)
Right. I made a mistake
In order to change the selected item in the combobox,
combobox.setSelectedItem() needs to be called. which means that you
need to bind "selectedItem" and not "selectedItem.referernce". Binding
selectedItem means you are binding 2 object of different types.
You have 2 options:
1. change the underlying model of the combobox to references only and
handle the descripton in the renderer (The description is anyway a
display data and not functional data - depending on Locale - which
means it does not belong to the functional object)
2. Use autoBinding.setConverter to convert from String to bean and vice
versa while beansbinding is doing the synch.
Avital
| avital.nahon | 01/19/2010 | |
| Rom Yatziv | 01/19/2010 | |
|
<Possible follow-up(s)> |
||
|
[BBB-USERS] Re: Binding a JComboBox |
avital.nahon | 01/19/2010 |





