How can I set the default value of a required DropDownChoice that
should not have null values?

private static final List<String> PagerSizesList = Arrays.asList("25", "50", "100");

  // in constructor...
DropDownChoice pagerSizer = new DropDownChoice("search-page-size", PagerSizesList);
  add(pagerSizer);

I've tried overriding my DropDownChoice's getDefaultChoice(),

      @Override
      protected CharSequence getDefaultChoice(final Object selected)
      {
return "<option value=\"\">" + PagerSizesList.get(0) + "</ option>";
      }

but this replaces the label of the null string, but does not remove
the null string itself.

Thanks and best wishes,
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to