-1

Hi I have created DropDownChoice component of apache wicket. now what I want to do is that after component creation I want to set some choice as a default selected based on certain condition. I am not getting it anyhow. Anyone can plz help me out. Thanks in advance.

Harshad Sindhav
  • 171
  • 2
  • 7

1 Answers1

2

If you need to select multiple options then you should use org.apache.wicket.markup.html.form.ListMultipleChoice#ListMultipleChoice(java.lang.String, org.apache.wicket.model.IModel<? extends java.util.Collection<T>>, org.apache.wicket.model.IModel<? extends java.util.List<? extends T>>). The first model holds the selections, and the second holds all possible options.

martin-g
  • 17,243
  • 2
  • 23
  • 35