info("input: " + input);
}
};
add(form);
Select site = new Select("site");
form.add(site);
site.add(new SelectOption<String>("site1", new Model<String>("tss")));
site.add(new SelectOption<String>("site2", new Model<String>("jl")));
site.add(new SelectOption<String>("site3", new Model<String>("sd")));
site.add(new SelectOption<String>("site4", new Model<String>("bn")));
Select choices = new Select("choices");
form.add(choices);
IOptionRenderer<String> renderer = new IOptionRenderer<String>()
{
public String getDisplayValue(Object object)
{
return object.toString();
}
public IModel<String> getModel(Object value)
{
return new Model<String>((String) value);
}
};
IModel<Collection<? extends String>> model = new WildcardCollectionModel<String>(MANY_CHOICES);
choices.add(new SelectOptions<String>("manychoices", model, renderer));
}