Package org.exoplatform.webui.core

Examples of org.exoplatform.webui.core.UIComponent


    }

    public static class ChangeNodeActionListener extends EventListener<UIComponent> {
        public void execute(Event<UIComponent> event) throws Exception {
            String groupId = event.getRequestContext().getRequestParameter(OBJECTID);
            UIComponent uiComp = event.getSource();
            UIGroupMembershipSelector uiSelector = uiComp.getParent();
            uiSelector.changeGroup(groupId);
            UIComponent uiPermission = uiSelector.<UIComponent> getParent().getParent();
            uiPermission.setRenderSibling(uiPermission.getClass());
            uiPermission.broadcast(event, Event.Phase.PROCESS);
            UIPopupWindow uiPopup = uiSelector.getParent();
            uiPopup.setShow(true);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);// TODO: Update relevant tab panes
        }
View Full Code Here


    }

    public static class SelectMembershipActionListener extends EventListener<UIGroupMembershipSelector> {
        public void execute(Event<UIGroupMembershipSelector> event) throws Exception {
            UIGroupMembershipSelector uiSelector = event.getSource();
            UIComponent uiPermission = uiSelector.<UIComponent> getParent().getParent();
            uiPermission.setRenderSibling(uiPermission.getClass());
            WebuiRequestContext pcontext = event.getRequestContext();

            UIPopupWindow uiPopup = uiSelector.getParent();
            UIForm uiForm = uiSelector.getAncestorOfType(UIForm.class);

            if (uiSelector.getCurrentGroup() == null) {
                UIApplication uiApp = pcontext.getUIApplication();
                uiApp.addMessage(new ApplicationMessage("UIGroupMembershipSelector.msg.selectGroup", null));
                uiPopup.setShow(true);
                return;
            }
            event.getRequestContext().addUIComponentToUpdateByAjax(uiPermission);

            uiPermission.broadcast(event, event.getExecutionPhase());
            uiPopup.setShow(false);

        }
View Full Code Here

            if (uiForm != null) {
                event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
                uiForm.broadcast(event, event.getExecutionPhase());
            } else {
                event.getRequestContext().addUIComponentToUpdateByAjax(uiPopup);
                UIComponent uiParent = uiPopup.getParent();
                uiParent.broadcast(event, event.getExecutionPhase());
            }

        }
View Full Code Here

    public UITabContainer() {
        super();
    }

    private void moveTab(UITabContainer container, String childId, boolean isToLeft) {
        UIComponent selectedChild = container.getChildById(childId);
        List<UIComponent> children = container.getChildren();
        int selectedIndex = children.indexOf(selectedChild);
        if (isToLeft) {
            if (selectedIndex > 0) {
                Collections.swap(children, selectedIndex, selectedIndex - 1);
View Full Code Here

    public static class SelectTabActionListener extends EventListener<UITabContainer> {
        public void execute(Event<UITabContainer> event) throws Exception {
            String objectId = event.getRequestContext().getRequestParameter(OBJECTID);
            UITabContainer container = event.getSource();
            UIComponent goal = container.findComponentById(objectId);
            if (goal == null) {
                return;
            }
            UITabContainer parent = goal.getParent();
            List<UIComponent> children = parent.getChildren();
            for (UIComponent child : children) {
                if (child.getId().equals(objectId)) {
                    child.setRendered(true);
                    continue;
View Full Code Here

        List<UIComponent> children = ((UIContainer) uiComponent).getChildren();
        for (UIComponent child : children) {
            if (clazz.isInstance(child))
                return (T) child;
            else if (!ignoreClazz.isInstance(child)) {
                UIComponent value = findUIComponent(child, clazz, ignoreClazz);
                if (value != null)
                    return (T) value;
            }
        }
        return null;
View Full Code Here

            return;
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);
        UIContainer uiParent = null;

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
            uiParent = uiPortal;
        } else {
View Full Code Here

        if (clazz == null)
            return;
        UIPortalApplication portalApp = getUIPortalApplication();
        UIEditInlineWorkspace uiEditWS = portalApp.findFirstComponentOfType(UIEditInlineWorkspace.class);

        UIComponent uiComponent = uiEditWS.getUIComponent();
        if (uiComponent instanceof UIPortal) {
            UIPortal uiPortal = (UIPortal) uiComponent;
            uiPortal.setMaximizedUIComponent(null);
        }
View Full Code Here

    public void processDecode(UIPortalApplication uicomponent, WebuiRequestContext context) throws Exception {
        String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
        if (componentId == null)
            return;
        UIComponent uiTarget = uicomponent.findComponentById(componentId);
        if (uiTarget == null) {
            context.addUIComponentToUpdateByAjax(uicomponent.<UIComponent> getChildById(UIPortalApplication.UI_WORKING_WS_ID));
            context.addUIComponentToUpdateByAjax(uicomponent.getChild(UIMaskWorkspace.class));
            ((PortalRequestContext) context).ignoreAJAXUpdateOnPortlets(true);
            return;
        }
        if (uiTarget == uicomponent) {
            super.processDecode(uicomponent, context);
        } else {
            uiTarget.processDecode(context);
        }
    }
View Full Code Here

     */
    public void processAction(UIPortalApplication uicomponent, WebuiRequestContext context) throws Exception {
        String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
        if (componentId == null)
            return;
        UIComponent uiTarget = uicomponent.findComponentById(componentId);
        if (uiTarget == null)
            return;
        if (uiTarget == uicomponent)
            super.processAction(uicomponent, context);
        uiTarget.processAction(context);
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.core.UIComponent

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.