I am using createBoundComboBox(ValueModel, Value Model, String...
when I am clicking on the combobox everything looks ok, but when I move mouse to select an item it becomes invisible ??? (there is some kind of magic going on)
any help?
I am using createBoundComboBox(ValueModel, Value Model, String...
when I am clicking on the combobox everything looks ok, but when I move mouse to select an item it becomes invisible ??? (there is some kind of magic going on)
any help?
final List sexValues = new SexValues().getSexValues();
class SexWrapper extends ValueModelWrapper {
public SexWrapper(ValueModel valueModel) {
super(valueModel);
}
public Object getValue() throws IllegalArgumentException {
// from sex to sexValue object
return super.getValue();
}
public void setValue(Object value) throws IllegalArgumentException {
// set from sexValue object to sex
super.setValue(value);
}
}
ValueModel sexListHolder = new ValueHolder(sexValues);
SexValue sexValue = (SexValue) sexValues.get(1);
ValueModel selectedHolder = new SexWrapper( new ValueHolder(sexValue) );
JComboBox sexSelector = getFormModel().createBoundComboBox(selectedHolder,
sexListHolder, "description1");
formBuilder.getLayoutBuilder().cell( new JLabel("Sex") );
formBuilder.getLayoutBuilder().cell( sexSelector, "colSpec=leftref");
formBuilder.row();
I have the exact same problem - haven't had time to investigate it yet, though.
I have that exact same problem too, and it isn't limited to only bound comboboxes. If I create an ordinary combo box with
I still have that same problem in a Spring-RCP application.Code:JComboBox combo = new JComboBox();
Could it be that somebody sets some static property affecting all comboboxes somewhere in Spring-RCP? I started to get these "invisible" items after I updated Spring-RCP from CVS about a week ago.
I am using Java 1.5 update 1.
I'm using Java 1.5 as well... I wonder if that could be common amongst us all? I'm also using jgoodies looks. One could wonder if there is a strange interaction between Java 1.5, jgoodies looks, and possibly spring-rich? I do know that if I use the nifty auto completing combobox feature of spring-rich that the problem goes away (for those particular comboboxes).
- Andy
I tried
new ComboBoxAutoCompletion( jcombobox );
It fixed the above described problem but introduced another one: it does not display correctly selected value, it shows the string value of the object which is a bean (the values in the drop down list are showing correctly).
Ok, I resolved it, I had to add toString method to my bean to display right value.
toString() is a workaround - but this is a bug that has been recently fixed in cvs I believe. With the fix it should pull the currently selected value from the property just as the list does.
- Andy
Has this problem been fixed? I am using the latest version of RCP and I still get this problem.
The problem you're describing is related to jdk1.5. The ComboBoxAutoCompletion class fixes this problem.
Peter