Package org.openfaces.component.window

Examples of org.openfaces.component.window.PopupLayer


        String clientId = eventPreview.getClientId(context);
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement("div", eventPreview);
        writer.writeAttribute("id", clientId, null);

        PopupLayer popupLayer = Components.getOrCreateFacet(
                context, component, PopupLayer.COMPONENT_TYPE, "_popupLayer", PopupLayer.class);
        popupLayer.setId(eventPreview.getId() + Rendering.SERVER_ID_SUFFIX_SEPARATOR + "popupLayer");
        popupLayer.setStyle(eventPreview.getStyle());
        popupLayer.setStyleClass(eventPreview.getStyleClass());
        popupLayer.setHideOnOuterClick(true);
        popupLayer.encodeAll(context);

        OUIComponent timetableView = (OUIComponent) eventPreview.getParent();

        String componentJs;
        if (timetableView instanceof MonthTable) {
View Full Code Here


    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        if (AjaxUtil.getSkipExtraRenderingOnPortletsAjax(context))
            return;

        ResponseWriter writer = context.getResponseWriter();
        PopupLayer popup = (PopupLayer) component;

        writer.startElement("div", component);
        writeIdAttribute(context, component);

        String defaultClass = getDefaultClassName() +
                " " + DefaultStyles.getBackgroundColorClass();
        if (popup.isModal())
            defaultClass += " o_popuplayer_modal";

        String styleNames = Styles.getCSSClass(context,
                component, popup.getStyle(), defaultClass, popup.getStyleClass());
        writeAttribute(writer, "class", styleNames);

        Rendering.writeStandardEvents(writer, popup);
    }
View Full Code Here

    @Override
    public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
        if (AjaxUtil.getSkipExtraRenderingOnPortletsAjax(context))
            return;

        PopupLayer popup = (PopupLayer) component;
        Rendering.renderChildren(context, popup);
        encodeCustomContent(context, popup);
    }
View Full Code Here

            return '\'' + str + '\'';
    }

    @Override
    public void decode(FacesContext context, UIComponent component) {
        PopupLayer layer = ((PopupLayer) component);

        String visibleKey = component.getClientId(context) + VISIBLE_HIDDEN_FIELD_SUFFIX;
        String visibleValue = context.getExternalContext().getRequestParameterMap().get(visibleKey);
        if (visibleValue != null) {
            boolean visible = Boolean.valueOf(visibleValue);
            if (layer.isVisible() != visible) {
                layer.setVisible(visible);
            }
        }

        String leftKey = component.getClientId(context) + LEFT_HIDDEN_FIELD_SUFFIX;
        String leftValue = context.getExternalContext().getRequestParameterMap().get(leftKey);
        if (leftValue != null && leftValue.length() == 0) {
            leftValue = null;
        }
        String popupLeft = layer.getLeft();
        if (popupLeft != null && !popupLeft.equals(leftValue) || leftValue != null && !leftValue.equals(popupLeft)) {
            layer.setLeft(leftValue);
        }

        String topKey = component.getClientId(context) + TOP_HIDDEN_FIELD_SUFFIX;
        String topValue = context.getExternalContext().getRequestParameterMap().get(topKey);
        if (topValue != null && topValue.length() == 0) {
            topValue = null;
        }
        String popupTop = layer.getTop();
        if (popupTop != null && !popupTop.equals(topValue) || topValue != null && !topValue.equals(popupTop)) {
            layer.setTop(topValue);
        }

    }
View Full Code Here

TOP

Related Classes of org.openfaces.component.window.PopupLayer

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.