Package org.openfaces.component.timetable

Examples of org.openfaces.component.timetable.TimetableViewSwitcher


import java.util.List;

public class TimetableViewSwitcherRenderer extends TabSetRenderer {
    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        TimetableViewSwitcher switcher = (TimetableViewSwitcher) component;
        Timetable timetable = switcher.getTimetable();
        List<UIComponent> children = switcher.getChildren();
        children.clear();
        children.add(createTabSetItem("Month", switcher, "monthItem"));
        children.add(createTabSetItem("Week", switcher, "weekItem"));
        children.add(createTabSetItem("Day", switcher, "dayItem"));
        switcher.setOnchange(
                new ScriptBuilder().O$(timetable).dot().functionCall("setViewType",
                        new RawScript("['month','week','day'][O$('" + switcher.getClientId(context) + "').getSelectedIndex()]")
                ).toString()
        );

        super.encodeBegin(context, component);
View Full Code Here

TOP

Related Classes of org.openfaces.component.timetable.TimetableViewSwitcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.