public void fieldChanged(Field field, int context) {
if (context == ChoiceField.CONTEXT_CHANGE_OPTION) {
ChoiceField choiceField = (ChoiceField) field;
int index = choiceField.getSelectedIndex();
if (index >= 0) {
Category category = (Category) choiceField.getChoice(index);
displayCategory(category);
}
}
}
});