SwitchType mode = component.getSwitchType();
return SwitchType.client.equals(mode);
}
protected void writeInitFunction(FacesContext context, UIComponent component) throws IOException {
AbstractSchedule schedule = (AbstractSchedule) component;
ResponseWriter writer = context.getResponseWriter();
String clientId = schedule.getClientId(context);
Locale locale = context.getViewRoot().getLocale();
String widgetVar = schedule.getWidgetVar();
if (widgetVar != null) {
writer.writeText("var " + widgetVar + " = ", null);
}
final Map<String, Object> options = getOptions(schedule);
options.put("locale", locale.toString());