input = {
@HandlerInput(name = "calendarComponent", type = com.sun.webui.jsf.component.Calendar.class, required = true)},
output = {
@HandlerOutput(name = "pattern", type = String.class)})
public static void getDatePattern(HandlerContext handlerCtx) {
Calendar calendar = (Calendar) handlerCtx.getInputValue("calendarComponent");
String pattern = calendar.getDateFormatPattern();
if (pattern == null || pattern.length() == 0) {
pattern = calendar.getDatePicker().getDateFormatPattern();
if (pattern == null || pattern.length() == 0) {
pattern = "MM/dd/yyyy"; //default pattern
}
}