Package org.exoplatform.web.application

Examples of org.exoplatform.web.application.RequireJS


     */
    private static void removeUIComponent(UIComponent uiComponent, PortalRequestContext pcontext, boolean isUpdate) {
        UIContainer uiParent = uiComponent.getParent();
        uiParent.getChildren().remove(uiComponent);

        RequireJS module = pcontext.getJavascriptManager().require("SHARED/portal", "portal");
        if (isUpdate) {
            pcontext.addUIComponentToUpdateByAjax(uiParent);
            pcontext.ignoreAJAXUpdateOnPortlets(true);
        } else {
            StringBuffer buffer = new StringBuffer();
            buffer.append("portal.UIPortal.removeComponent('");
            if (uiComponent instanceof UIPortlet) {
                buffer.append(UI_PORTLET_PREFIX);
            }
            buffer.append(uiComponent.getId());
            buffer.append("');");
            module.addScripts(buffer.toString());
        }
        module.require("SHARED/portalComposer", "portalComposer").addScripts("portalComposer.toggleSaveButton();");
    }
View Full Code Here


     */
    private static void removeUIComponent(UIComponent uiComponent, PortalRequestContext pcontext, boolean isUpdate) {
        UIContainer uiParent = uiComponent.getParent();
        uiParent.getChildren().remove(uiComponent);

        RequireJS module = pcontext.getJavascriptManager().require("SHARED/portal", "portal");
        if (isUpdate) {
            pcontext.addUIComponentToUpdateByAjax(uiParent);
            pcontext.ignoreAJAXUpdateOnPortlets(true);
        } else {
            StringBuffer buffer = new StringBuffer();
            buffer.append("portal.UIPortal.removeComponent('");
            if (uiComponent instanceof UIPortlet) {
                buffer.append(UI_PORTLET_PREFIX);
            }
            buffer.append(uiComponent.getId());
            buffer.append("');");
            module.addScripts(buffer.toString());
        }
        module.require("SHARED/portalComposer", "portalComposer").addScripts("portalComposer.toggleSaveButton();");
    }
View Full Code Here

     */
    private static void removeUIComponent(UIComponent uiComponent, PortalRequestContext pcontext, boolean isUpdate) {
        UIContainer uiParent = uiComponent.getParent();
        uiParent.getChildren().remove(uiComponent);

        RequireJS module = pcontext.getJavascriptManager().require("SHARED/portal", "portal");
        if (isUpdate) {
            pcontext.addUIComponentToUpdateByAjax(uiParent);
            pcontext.ignoreAJAXUpdateOnPortlets(true);
        } else {
            StringBuffer buffer = new StringBuffer();
            buffer.append("portal.UIPortal.removeComponent('");
            if (uiComponent instanceof UIPortlet) {
                buffer.append(UI_PORTLET_PREFIX);
            }
            buffer.append(uiComponent.getId());
            buffer.append("');");
            module.addScripts(buffer.toString());
        }
        module.require("SHARED/portalComposer", "portalComposer").addScripts("portalComposer.toggleSaveButton();");
    }
View Full Code Here

     */
    private static void removeUIComponent(UIComponent uiComponent, PortalRequestContext pcontext, boolean isUpdate) {
        UIContainer uiParent = uiComponent.getParent();
        uiParent.getChildren().remove(uiComponent);

        RequireJS module = pcontext.getJavascriptManager().require("SHARED/portal", "portal");
        if (isUpdate) {
            pcontext.addUIComponentToUpdateByAjax(uiParent);
            pcontext.ignoreAJAXUpdateOnPortlets(true);
        } else {
            StringBuffer buffer = new StringBuffer();
            buffer.append("portal.UIPortal.removeComponent('");
            if (uiComponent instanceof UIPortlet) {
                buffer.append(UI_PORTLET_PREFIX);
            }
            buffer.append(uiComponent.getId());
            buffer.append("');");
            module.addScripts(buffer.toString());
        }
        module.require("SHARED/portalComposer", "portalComposer").addScripts("portalComposer.toggleSaveButton();");
    }
View Full Code Here

            UIVirtualList virtualList = event.getSource();
            UIRepeater repeater = virtualList.getRepeater();
            WebuiRequestContext rContext = event.getRequestContext();

            repeater.feedNext();
            RequireJS require = rContext.getJavascriptManager().require("SHARED/uiVirtualList", "uiVirtualList");
            if (repeater.hasNext()) {
                require.addScripts("uiVirtualList.updateList('" + virtualList.getId() + "', true);");
            } else {
                require.addScripts("uiVirtualList.updateList('" + virtualList.getId() + "', false);");
            }

            rContext.addUIComponentToUpdateByAjax((UIComponent) repeater);
        }
View Full Code Here

TOP

Related Classes of org.exoplatform.web.application.RequireJS

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.