Package org.richfaces.sandbox.component

Examples of org.richfaces.sandbox.component.AbstractTab


            try {
                DataVisitor visitor = new AbstractTogglePanelItemVisitor(tabPanel, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                    @Override
                    public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                    {
                        AbstractTab tab = (AbstractTab) item;
                        try {
                            writeTopTabHeader(context, w, tab);
                            writeTopTabSpacer(w, tabPanel);
                        } catch (IOException e) {
                            throw new RuntimeException(e);
                        }
                        return DataVisitResult.CONTINUE;
                    }
                });
                tabPanel.walk(context, visitor, null);
            } finally {
                tabPanel.setRowKey(context, null);
            }
        } else {
            for (AbstractTogglePanelItemInterface item : ((AbstractTogglePanel) comp).getRenderedItems()) {
                AbstractTab tab = (AbstractTab) item;
                writeTopTabHeader(context, w, tab);
                writeTopTabSpacer(w, comp);
            }
        }
View Full Code Here


            try {
                final DataVisitor visitor = new AbstractTogglePanelItemVisitor(tabPanel, new AbstractTogglePanelItemVisitor.TabVisitorCallback() {
                    @Override
                    public DataVisitResult visit(AbstractTogglePanelItemInterface item)
                    {
                        AbstractTab tab = (AbstractTab) item;
                        TabRenderer renderer = (TabRenderer) tab.getRenderer(context);
                        try {
                            renderer.writeJavaScript(writer, context, tab);
                        } catch (IOException e) {
                            throw new RuntimeException(e);
                        }
                        return DataVisitResult.CONTINUE;
                    }
                });
                tabPanel.walk(context, visitor, null);
            } finally {
                tabPanel.setRowKey(context, null);
            }
        } else {
            if (tabPanel.getChildCount() > 0) {
                for (UIComponent child : tabPanel.getChildren()) {
                    if (child instanceof AbstractTab) {
                        AbstractTab tab = (AbstractTab) child;
                        TabRenderer renderer = (TabRenderer) tab.getRenderer(context);
                        renderer.writeJavaScript(writer, context, tab);
                    }
                }
            }
        }
View Full Code Here

    @Override
    protected void doDecode(FacesContext context, UIComponent component) {

        Map<String, String> requestMap = context.getExternalContext().getRequestParameterMap();

        AbstractTab tab = (AbstractTab) component;
        String compClientId = component.getClientId(context);
        if (requestMap.get(compClientId) != null) {
            AbstractTabPanel parentTabPanel = getParentTabPanel(tab);

            if (parentTabPanel.isImmediate()) {
                tab.setImmediate(true);
            }
            new ActionEvent(tab).queue();

            if (context.getPartialViewContext().isPartialRequest()) {
                context.getPartialViewContext().getRenderIds().add(component.getClientId(context));
                addOnCompleteParam(context, tab.getName(), tab.getTabPanel().getClientId(context));
            }
        }
    }
View Full Code Here

    }

    @Override
    protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {

        AbstractTab tab = (AbstractTab) component;

        if (tab.shouldProcess() && !tab.isDisabled()) {
            super.doEncodeChildren(writer, context, tab);
        }
    }
View Full Code Here

TOP

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

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.