I have a comboBox on the xpage associated with the Number field. The code used to populate the SelectItem values for the combo is in a managed bean that looks like this:
public List<SelectItem> getYearSelectItems() {
int thisYear = Calendar.getInstance().get(Calendar.YEAR);
List<SelectItem> selectItems = new ArrayList<SelectItem>();
selectItems.add(new SelectItem(new Integer(thisYear - 1), new Integer(thisYear - 1).toString()));
selectItems.add(new SelectItem(new Integer(thisYear), new Integer(thisYear).toString()));
selectItems.add(new SelectItem(new Integer(thisYear + 1), new Integer(thisYear + 1).toString()));
for(int i = 1; i < selectItems.size(); i ++) {
System.out.println(new Integer(i).toString() + ": " + selectItems.get(i).getValue().getClass());
}
return selectItems;
}
As you can see, I am printing class names for SelectItem values for the console for debugging. The class name specified in the console is java.lang.Integer, so the part is definitely correct.
Combobox uses a numerical converter to match a field in a form, only an integer.
The problem is that validation fails with this configuration.
, , , , bean.
, 853 , 9. ; ? SPR?
, .
, Ove