Package org.exoplatform.webui.core

Examples of org.exoplatform.webui.core.UIPopupWindow


    public static class CloseActionListener extends EventListener<UIUserSelector> {
        public void execute(Event<UIUserSelector> event) throws Exception {
            UIUserSelector uiForm = event.getSource();
            UIGroupMembershipForm uiParent = uiForm.getAncestorOfType(UIGroupMembershipForm.class);
            UIPopupWindow uiPopup = uiParent.getChild(UIPopupWindow.class);
            uiPopup.setUIComponent(null);
            uiPopup.setShow(false);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiParent);
        }
View Full Code Here


    }

    public static class SearchUserActionListener extends EventListener<UIGroupMembershipForm> {
        public void execute(Event<UIGroupMembershipForm> event) throws Exception {
            UIGroupMembershipForm uiGroupForm = event.getSource();
            UIPopupWindow searchUserPopup = uiGroupForm.getChild(UIPopupWindow.class);
            UIUserSelector userSelector = uiGroupForm.createUIComponent(UIUserSelector.class, null, null);
            userSelector.setShowSearchGroup(false);
            String userName = uiGroupForm.getUIStringInput(USER_NAME).getValue();
            userSelector.getUIStringInput(UIUserSelector.FIELD_KEYWORD).setValue(userName);
            searchUserPopup.setUIComponent(userSelector);
            searchUserPopup.setShow(true);

            // TODO tamnd PORTAL-3010 searching a user in the add member form does not work.
            String filter = userSelector.getUIFormSelectBox(UIUserSelector.FIELD_FILTER).getValue();
            String groupId = userSelector.getSelectedGroup();
View Full Code Here

    public static class SaveActionListener extends EventListener<UIGroupEditMembershipForm> {
        public void execute(Event<UIGroupEditMembershipForm> event) throws Exception {
            UIGroupEditMembershipForm uiForm = event.getSource();
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            UIPopupWindow uiPopup = uiForm.getParent();
            OrganizationService service = uiForm.getApplicationComponent(OrganizationService.class);

            Membership formMembership = service.getMembershipHandler().findMembership(uiForm.membershipId);
            if (formMembership == null) {
                uiApp.addMessage(new ApplicationMessage("UIGroupEditMembershipForm.msg.membership-delete", null));
                uiPopup.setUIComponent(null);
                uiPopup.setShow(false);
                return;
            }
            String userName = formMembership.getUserName();
            Group group = service.getGroupHandler().findGroupById(uiForm.groupId);
            User user = service.getUserHandler().findUserByName(userName);
            MembershipHandler memberShipHandler = service.getMembershipHandler();
            String memberShipTypeStr = uiForm.getUIFormSelectBox(MEMBER_SHIP).getValue();
            MembershipType membershipType = service.getMembershipTypeHandler().findMembershipType(memberShipTypeStr);
            Membership membership = memberShipHandler.findMembershipByUserGroupAndType(userName, group.getId(),
                    membershipType.getName());
            if (membership != null) {
                uiApp.addMessage(new ApplicationMessage("UIGroupEditMembershipForm.msg.membership-exist", null));
                return;
            }
            memberShipHandler.removeMembership(uiForm.membershipId, true);
            memberShipHandler.linkMembership(user, group, membershipType, true);

            uiPopup.setUIComponent(null);
            uiPopup.setShow(false);
        }
View Full Code Here

    }

    public static class CancelActionListener extends EventListener<UIGroupEditMembershipForm> {
        public void execute(Event<UIGroupEditMembershipForm> event) throws Exception {
            UIGroupEditMembershipForm uiForm = event.getSource();
            UIPopupWindow uiPopup = uiForm.getParent();
            uiPopup.setUIComponent(null);
            uiPopup.setShow(false);
        }
View Full Code Here

        super.processRender(context);
        UIUserMembershipSelector uiUserMembershipSelector = getChild(UIUserMembershipSelector.class);
        if (uiUserMembershipSelector == null) {
            return;
        }
        UIPopupWindow uiPopupWindow = uiUserMembershipSelector.getChild(UIPopupWindow.class);
        if (uiPopupWindow == null) {
            return;
        }
        uiPopupWindow.processRender(context);
    }
View Full Code Here

    public UIUserInGroup() throws Exception {
        UIGrid uiGrid = addChild(UIGridUser.class, "UIGridUser", null);
        uiGrid.configure("id", USER_BEAN_FIELD, USER_ACTION);
        uiGrid.getUIPageIterator().setId("UIUserInGroupIterator");
        addChild(UIGroupMembershipForm.class, null, null);
        UIPopupWindow editMemberPopup = addChild(UIPopupWindow.class, null, "EditMembership");
        editMemberPopup.setWindowSize(400, 0);
    }
View Full Code Here

        public void execute(Event<UIUserInGroup> event) throws Exception {
            UIUserInGroup uiUserInGroup = event.getSource();
            String id = event.getRequestContext().getRequestParameter(OBJECTID);
            OrganizationService service = uiUserInGroup.getApplicationComponent(OrganizationService.class);
            MembershipHandler handler = service.getMembershipHandler();
            UIPopupWindow uiPopup = uiUserInGroup.getChild(UIPopupWindow.class);
            UIGroupEditMembershipForm uiEditMemberShip = uiUserInGroup.createUIComponent(UIGroupEditMembershipForm.class, null,
                    null);
            uiEditMemberShip.setValue(handler.findMembership(id), uiUserInGroup.getSelectedGroup());
            uiPopup.setUIComponent(uiEditMemberShip);
            uiPopup.setShow(true);
        }
View Full Code Here

    public static class SelectUserActionListener extends EventListener<UIListUsers> {
        public void execute(Event<UIListUsers> event) throws Exception {
            UIListUsers uiListUser = event.getSource();
            String userName = event.getRequestContext().getRequestParameter(OBJECTID);
            UIPopupWindow popup = uiListUser.getAncestorOfType(UIPopupWindow.class);
            popup.setShow(false);
            UIGroupMembershipForm groupMembershipForm = popup.getParent();
            groupMembershipForm.setUserName(userName);
            event.getRequestContext().addUIComponentToUpdateByAjax(groupMembershipForm);
        }
View Full Code Here

            if (node.getI18nizedLabels() == null) {
                uiNodeSelector.invokeI18NizedLabels(node);
            }

            UIPopupWindow uiManagementPopup = uiNodeSelector.getAncestorOfType(UIPopupWindow.class);
            UIPageNodeForm uiNodeForm = uiApp.createUIComponent(UIPageNodeForm.class, null, null);
            uiManagementPopup.setUIComponent(uiNodeForm);

            UserNavigation edittedNav = uiNodeSelector.getEdittedNavigation();
            uiNodeForm.setContextPageNavigation(edittedNav);
            uiNodeForm.setValues(node);
            uiNodeForm.setSelectedParent(node.getParent());
            uiManagementPopup.setWindowSize(800, 500);
            event.getRequestContext().addUIComponentToUpdateByAjax(uiManagementPopup.getParent());
        }
View Full Code Here

            WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
            context.getUIApplication().addMessage(
                    new ApplicationMessage("UINavigationNodeSelector.msg." + NavigationError.NAVIGATION_NO_SITE.name(), null,
                            ApplicationMessage.ERROR));

            UIPopupWindow popup = getAncestorOfType(UIPopupWindow.class);
            popup.createEvent("ClosePopup", Phase.PROCESS, context).broadcast();

            PortalRequestContext prContext = Util.getPortalRequestContext();
            UIWorkingWorkspace uiWorkingWS = Util.getUIPortalApplication().getChild(UIWorkingWorkspace.class);
            prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
            prContext.setFullRender(true);
View Full Code Here

TOP

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

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.