/** * 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) { clear(); if (propertyName == null || propertyName.isEmpty()) { addChoice("All Dates", false); addChoice("Today|T|T", false); addChoice("Last Week|T|T-7", false); addChoice("Last Month|T|T-30|1", false); addChoice("Last Year|T|T-365", false); addChoice("Last Two Years|T|T-730", false); } else { for (String value : PropertyUtil.getValues(propertyName, null)) { addChoice(value, false); } } checkSelection(true); }