You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jehan <je...@gmail.com> on 2011/03/09 11:45:32 UTC

how to process radioButtons

Dear All

I have a list of user names, I populated listView using it, with each
username I created three radion buttons (present,absent, leave), please see
appended source code

I want when I click save button then status of each username printed or
saved, how to do it.



*

ListView* listView = *new ListView("profile-rows", UserNameList)//id, list

{

protected void populateItem(ListItem item) //foreach item in data

{

NameWrapper person = (NameWrapper) item.getModelObject();

item.add(new Label("first-name", person.getName()));

final RadioGroup statusRadioGroup = new RadioGroup("radio-admin", newModel());

item.add(statusRadioGroup );

statusRadioGroup .add(new Radio("present", new Model()));

statusRadioGroup .add(new Radio("absent", new Model()));

statusRadioGroup .add(new Radio("leave", new Model()));

}

}*;

profileForm.add(listView);

profileForm.add(*new* Button("button-save", *new Model()*));

add(profileForm);