Package org.richfaces.component

Examples of org.richfaces.component.AbstractTabPanel


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

        AbstractTab tab = (AbstractTab) component;
        String compClientId = component.getClientId(context);

        AbstractTabPanel parentTabPanel = getParentTabPanel(tab);

        PartialViewContext pvc = context.getPartialViewContext();

        if (pvc.isPartialRequest()) {
            // encode the tabPanel headers when the tab is encoded
            String headerMetaComponentId = parentTabPanel.getClientId(context)
                    + MetaComponentResolver.META_COMPONENT_SEPARATOR_CHAR
                    + AbstractTabPanel.HEADER_META_COMPONENT;
            pvc.getRenderIds().add(headerMetaComponentId);
        }

        if (requestMap.get(compClientId) != null) {
            if (parentTabPanel.isImmediate()) {
                tab.setImmediate(true);
            }
            new ActionEvent(tab).queue();
        }
    }
View Full Code Here


    @Override
    protected void doEncodeBegin(ResponseWriter w, FacesContext context, UIComponent component) throws IOException {
        super.doEncodeBegin(w, context, component);

        AbstractTabPanel tabPanel = (AbstractTabPanel) component;
        if (tabPanel.isHeaderPositionedTop()) {
            writeTabsLine(w, context, component);
            writeTabsLineSeparator(w, component);
        }
    }
View Full Code Here

    private void writeTabsLine(ResponseWriter w, FacesContext context, UIComponent comp) throws IOException {
        w.startElement(DIV, comp);
        String id = comp.getClientId() + AbstractTabPanel.HEADER_META_COMPONENT;
        w.writeAttribute(ID_ATTRIBUTE, id, null);
        AbstractTabPanel tabPanel = (AbstractTabPanel) comp;
        if (tabPanel.isHeaderPositionedTop()) {
            w.writeAttribute(CLASS, "rf-tab-hdr-tabline-vis rf-tab-hdr-tabline-top", null);
        } else {
            w.writeAttribute(CLASS, "rf-tab-hdr-tabline-vis rf-tab-hdr-tabline-btm", null);
        }
        w.startElement("table", comp);
View Full Code Here

    }

    @Override
        public void encodeMetaComponent(FacesContext context, UIComponent component, String metaComponentId) throws IOException {
            if (AbstractTabPanel.HEADER_META_COMPONENT.equals(metaComponentId)) {
                    AbstractTabPanel panel = (AbstractTabPanel) component;
                    PartialResponseWriter w = context.getPartialViewContext().getPartialResponseWriter();
                    String id = component.getClientId() + AbstractTabPanel.HEADER_META_COMPONENT;
                    w.startUpdate(id);
                    writeTabsLine(w, context, panel);
                    w.endUpdate();
View Full Code Here

        w.writeText(text, null);
        w.endElement(DIV_ELEM);
    }

    private void writeTopTabFirstSpacer(ResponseWriter w, UIComponent comp) throws IOException {
        AbstractTabPanel tabPanel = (AbstractTabPanel) comp;
        if (tabPanel.isHeaderAlignedLeft()) {
            writeTopTabSpacer(w, comp, "padding-left: 5px;", "rf-tab-hdr-spcr");
        } else {
            writeTopTabSpacer(w, comp, "padding-left: 5px; width:100%", "rf-tab-hdr-spcr");
        }
    }
View Full Code Here

    private void writeTopTabSpacer(ResponseWriter w, UIComponent comp) throws IOException {
        writeTopTabSpacer(w, comp, "", "rf-tab-hdr-spcr rf-tab-hortab-tabspcr-wdh");
    }

    private void writeTopTabLastSpacer(ResponseWriter w, UIComponent comp) throws IOException {
        AbstractTabPanel tabPanel = (AbstractTabPanel) comp;
        if (tabPanel.isHeaderAlignedLeft()) {
            writeTopTabSpacer(w, comp, "padding-right: 5px; width: 100%;", "rf-tab-hdr-spcr");
        } else {
            writeTopTabSpacer(w, comp, "padding-right: 5px;", "rf-tab-hdr-spcr");
        }
    }
View Full Code Here

        w.endElement(TD_ELEM);
    }

    @Override
    protected void doEncodeEnd(final ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
        AbstractTabPanel panel = (AbstractTabPanel) component;
        if (!panel.isHeaderPositionedTop()) {
            writeTabsLineSeparator(writer, component);
            writeTabsLine(writer, context, component);
        }
        writer.endElement(HtmlConstants.DIV_ELEM);
    }
View Full Code Here

    @Override
    protected void doEncodeBegin(ResponseWriter w, FacesContext context, UIComponent component) throws IOException {
        super.doEncodeBegin(w, context, component);

        AbstractTabPanel tabPanel = (AbstractTabPanel) component;
        if (tabPanel.isHeaderPositionedTop()) {
            writeTabsLine(w, context, component);
            writeTabsLineSeparator(w, component);
        }
    }
View Full Code Here

        writer.endElement(DIV);
    }

    private void writeTabsLine(ResponseWriter w, FacesContext context, UIComponent comp) throws IOException {
        w.startElement(DIV, comp);
        AbstractTabPanel tabPanel = (AbstractTabPanel) comp;
        if (tabPanel.isHeaderPositionedTop()) {
            w.writeAttribute(CLASS, "rf-tab-hdr-tabline-vis rf-tab-hdr-tabline-top", null);
        } else {
            w.writeAttribute(CLASS, "rf-tab-hdr-tabline-vis rf-tab-hdr-tabline-btm", null);
        }
        w.startElement("table", comp);
View Full Code Here

        w.writeText(text, null);
        w.endElement(DIV_ELEM);
    }

    private void writeTopTabFirstSpacer(ResponseWriter w, UIComponent comp) throws IOException {
        AbstractTabPanel tabPanel = (AbstractTabPanel) comp;
        if (tabPanel.isHeaderAlignedLeft()) {
            writeTopTabSpacer(w, comp, "padding-left: 5px;", "rf-tab-hdr-spcr");
        } else {
            writeTopTabSpacer(w, comp, "padding-left: 5px; width:100%", "rf-tab-hdr-spcr");
        }
    }
View Full Code Here

TOP

Related Classes of org.richfaces.component.AbstractTabPanel

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.