收录日期:2019/04/24 20:27:39 时间:2010-06-16 01:06:45 标签:wicket

I'm using a ListMultipleChoice component in wicket and I want to get the selected items. It seems that isSelected is protected so I cannot use it. How do I get the selected items?

You must bind your list with data and ListMultipleChoice as in Example

public MyForm(String id, IModel model, IFeedback feedback) {
    List choices = new ArrayList();
    choices.add("foo");
    choices.add("bar");
    MultiListChoice lc = new MultiListChoice("myMultiListChoice", new PropertyModel(model, "foobarList"), choices);
    add(lc);
    ...
}
How do you get the selected items in a Wicket ListMultipleChoice? How do you get the selected value of a Spinner? How do you manually set a RadioGroup value in wicket? How do you get the selected character position in a JTextArea? How do you get the currently selected