/** * Load choices from a string array. * * @param choices A string array containing choices. */ public void loadChoices(String... choices) { loadChoices(Arrays.asList(choices)); }
/** * Load choices from the named property * * @param propertyName Name of the property containing the choices. Must be in the acceptable * format. If the property name is null, loads a default set of choices. */ public void loadChoices(String propertyName) { if (propertyName == null || propertyName.isEmpty()) { loadChoices(DEFAULT_CHOICES); } else { loadChoices(PropertyUtil.getValues(propertyName, null)); } }
public DateRangePicker() { super(); setReadonly(true); customItem = new Dateitem(); customItem.setLabel("Custom..."); addChild(customItem); setAllowCustom(false); loadChoices(DEFAULT_CHOICES); }