Package org.openfaces.component.window

Examples of org.openfaces.component.window.AbstractWindow


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

        ResponseWriter writer = context.getResponseWriter();
        AbstractWindow win = (AbstractWindow) component;
        String clientId = win.getClientId(context);

        super.encodeBegin(context, component);

        writer.startElement("table", win);
        writer.writeAttribute("id", clientId + "::table", null);
View Full Code Here


    @Override
    protected void encodeScriptsAndStyles(FacesContext context, PopupLayer component) throws IOException {
        super.encodeScriptsAndStyles(context, component);

        AbstractWindow win = (AbstractWindow) component;
        ScriptBuilder sb = new ScriptBuilder();
        sb.initScript(context, win, "O$.Window._init",
                win.isResizable(),
                win.isDraggableByContent(),
                win.getMinWidth(),
                win.getMinHeight());
        Rendering.renderInitScript(context, sb, getWindowJs(context));
    }
View Full Code Here

    @Override
    public void decode(FacesContext context, UIComponent component) {
        super.decode(context, component);

        AbstractWindow window = (AbstractWindow) component;
        String sizeKey = window.getClientId(context) + "::size";
        String sizeStr = context.getExternalContext().getRequestParameterMap().get(sizeKey);
        if (sizeStr != null) {
            String[] widthAndHeightArr = sizeStr.split(",");
            int width = Integer.parseInt(widthAndHeightArr[0]);
            int height = Integer.parseInt(widthAndHeightArr[1]);
            window.setWidth(width + "px");
            window.setHeight(height + "px");
        }
    }
View Full Code Here

TOP

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

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.