Examples of UIBodyDesktop


Examples of org.dekka.component.objectInterface.UIBodyDesktop

    @Override
    public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
        if (!RenderKitUtils.assertValid(context, component)) {
            return;
        }
        final UIBodyDesktop uibd = (UIBodyDesktop) component;

        boolean declarePageWrapper = true;
        boolean declareDockWrapper = true;

        for (UIComponent uIComponent : uibd.getChildren()) {
            if (uIComponent instanceof UIBodyPageWrapper) {
                declarePageWrapper = false;
            }
            if (uIComponent instanceof UIBodyDockWrapper) {
                declareDockWrapper = false;
            }
        }

        if (declareDockWrapper) {
            Logger.getLogger(BodyDesktopRenderer.class.getName()).log(Level.FINEST, "Adding a dock wrapper to the desktop");
            final UIBodyDockWrapper uibdw = new UIBodyDockWrapper();
            uibd.getChildren().add(uibdw);
        }
       
        if (declarePageWrapper) {
            Logger.getLogger(BodyDesktopRenderer.class.getName()).log(Level.FINEST, "Adding a page wrapper to the desktop");
            final UIBodyPageWrapper uibpw = new UIBodyPageWrapper();
            uibd.getChildren().add(uibpw);
        }
       
        //Fix this div id for help Mocha to know where start the desktop
        uibd.setId(DESKTOP_ID);
       
        super.encodeBegin(context, uibd);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.