Hi and welcome to this mailing list!

it's not clear to me the purpose of the ListView in your code. Why do you need it and what is the relation between this component and RadioGroup?
Hello there, mighty developers.
I'm quite new in Wicket, so beforehand sorry if my question is stupid.
So what i have is a RadioGroup, with some childs. When page loads for the
first time,
one of child gets selected by default, and everything is fine. But, when i
change selection and
press submit button ( non-Ajax ), form validates,re-renders and "default"
child instead of selected one gets selection.
What i'm doing wrong or not doing at all?

here is the example of how childs get populated :

SelectItem[] selectOneRadioItems = new SelectItem[]{};
RadioGroup radioGroup = new RadioGroup("radioGroup", new Model());
ListView<SelectItem> selectOneRadioListItems = new
ListView<SelectItem>("radioGroup", Arrays.asList(selectOneRadioItems)) {
       protected void populateItem(ListItem<SelectItem> item) {
        Label label = new Label("label", new
Model<String>(item.getModel().getObject().getLabel()));
        item.add(label);
        SelectItemModel<Serializable> itemModel = new
SelectItemModel<Serializable>(SelectItem)item.getModel().getObject());
        Radio<Serializable> radio = new Radio<Serializable>("radio", itemModel,
RadioGroupParent);
        item.add(radio);
}
};

Any tips will be appreciated.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/RadioGroup-tp4651132.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to