Package org.richfaces.sandbox.component

Examples of org.richfaces.sandbox.component.AbstractTogglePanelItemInterface


    }

    public void encodeMetaComponent(FacesContext context, UIComponent component, String metaComponentId) throws IOException {
        if (AbstractTogglePanel.ACTIVE_ITEM_META_COMPONENT.equals(metaComponentId)) {
            AbstractTogglePanel panel = (AbstractTogglePanel) component;
            AbstractTogglePanelItemInterface item = panel.getItem(panel.getActiveItem());

            if (item != null) {
                partialStart(context, ((UIComponent) item).getClientId(context));
                ((UIComponent) item).encodeAll(context);
                partialEnd(context);
                addOnCompleteParam(context, item.getName(), panel.getClientId(context));
            } else {
                partialStart(context, component.getClientId(context));
                component.encodeAll(context);
                partialEnd(context);
                addOnCompleteParam(context, panel.getActiveItem(), panel.getClientId(context));
View Full Code Here


            component));
    }

    @Override
    protected Map<String, Object> getScriptObjectOptions(FacesContext context, UIComponent component) {
        AbstractTogglePanelItemInterface panelItem = (AbstractTogglePanelItemInterface) component;

        Map<String, Object> options = new HashMap<String, Object>();
        options.put("name", panelItem.getName());
        options.put("togglePanelId", component.getParent().getClientId(context));
        options.put("switchMode", panelItem.getSwitchType());

        AbstractTogglePanel panel = panelItem.getParentPanel();
        options.put("index", panel.getChildIndex(panelItem.getName()));

        TogglePanelRenderer.addEventOption(context, component, options, LEAVE);
        TogglePanelRenderer.addEventOption(context, component, options, ENTER);

        return options;
View Full Code Here

TOP

Related Classes of org.richfaces.sandbox.component.AbstractTogglePanelItemInterface

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.