James Moger
2014-06-03 6cc8ec025ad26f1451f0947fa4ad79bb2f9c292a
src/main/java/com/gitblit/wicket/panels/ChoiceOption.java
@@ -20,6 +20,7 @@
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.model.IModel;
import org.parboiled.common.StringUtils;
/**
 * A re-usable choice option panel.
@@ -38,14 +39,14 @@
   public ChoiceOption(String wicketId, String title, String description, IModel<T> model, List<T> choices) {
      super(wicketId);
      add(new Label("name", title));
      add(new Label("description", description));
      add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));
      add(new DropDownChoice<>("choice", model, choices).setEnabled(choices.size() > 0));
   }
   public ChoiceOption(String wicketId, String title, String description, DropDownChoice<?> choice) {
      super(wicketId);
      add(new Label("name", title));
      add(new Label("description", description));
      add(new Label("description", description).setVisible(!StringUtils.isEmpty(description)));
      add(choice.setMarkupId("choice").setEnabled(choice.getChoices().size() > 0));
   }
}