package org.wicketTutorial.callbackurl;
import java.util.Arrays;
import java.util.List;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.wicketTutorial.callbackurl.behaviors.OnChangeSingleChoiceBehavior;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.RadioChoice;
import org.wicketTutorial.commons.bootstrap.layout.BootstrapBasePage;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
public class HomePage extends BootstrapBasePage {
private static final long serialVersionUID = 1L;
public HomePage(final PageParameters parameters) {
super(parameters);
List colors = Arrays.asList(new String[] { "Red", "Blue", "Green", "Yellow"});
IModel radioModel = Model.of();
IModel selectModel = Model.of();
add(new RadioChoice("choices", radioModel, colors)
.add(new OnChangeSingleChoiceBehavior()));
add(new DropDownChoice("drpDwnChoices", selectModel, colors)
.add(new OnChangeSingleChoiceBehavior()));
add(new Label("radioModel", radioModel));
add(new Label("selectModel", selectModel));
}
}