public static String POPUP_SUFFIX = "_popup";
public static String CALENDAR_SUFFIX = "_calendar";
@Override
public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
TimePeriodSwitcher switcher = (TimePeriodSwitcher) component;
ResponseWriter writer = context.getResponseWriter();
writer.startElement("span", switcher);
writeIdAttribute(context, switcher);
LayeredPane layeredPane = getLayeredPane(switcher);
layeredPane.encodeAll(context);
Timetable timetable = switcher.getTimetableView();
Rendering.renderInitScript(context, new ScriptBuilder().initScript(context, switcher,
"O$.TimePeriodSwitcher._init", timetable),
Resources.utilJsURL(context),
TimetableRenderer.getTimetableJsURL(context));