public static interface DateChooser.YearTitleFormatter
DateItem
s, at the Javascript level. To
use a YearTitleFormatter in this common case, you will need to create a DateChooser subclass, mark it for processing
by the BeanFactory reflection mechanism, and specify it via the autoChild system. See the example code below, and
refer to the autoChild
and reflection
documentation for more details.
DateItem dateItem = new DateItem(); dateItem.setAutoChildConstructor("picker", "com.mycompany.client.MyDateChooser"); dateItem.setAutoChildProperties("picker", new MyDateChooser());And the
MyDateChooser
subclass:
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHeaderYearTitle(int value)
Method to provide the year representation that is shown in the DateChooser header.
|
java.lang.String |
getYearTitle(int value)
Method to provide the year representations that are shown in the DateChooser's "Select a year" dropdown.
|
java.lang.String getYearTitle(int value)
year
- The Gregorian year number to derive a display value forjava.lang.String getHeaderYearTitle(int value)
year
- The Gregorian year number to derive a display value for