Package org.exoplatform.webui.core

Examples of org.exoplatform.webui.core.UIApplication


         UIRegisterInputSet registerInput = registerForm.getChild(UIRegisterInputSet.class);

         if (registerInput.save(userHandler, context))
         {
            //TODO: Send email and add Account Activating feature
            UIApplication uiApp = context.getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIRegisterForm.registerWithSuccess.message", null));          
         }
         HttpServletRequest request = prContext.getRequest();
         HttpSession session = request.getSession();
         session.removeAttribute(Captcha.NAME);
      }
View Full Code Here


            return;
         }

         String typedUsername = userNameInput.getValue();
         WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
         UIApplication uiApp = context.getUIApplication();
         if (usernameIsUsed(typedUsername, orgService))
         {
            uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.user-exist", new String[]{typedUsername},
               ApplicationMessage.WARNING));
         }
         else
         {
            uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.user-not-exist", new String[]{typedUsername}));
         }
      }
View Full Code Here

      lastQuery_ = query;
      grid_.getUIPageIterator().setPageList(new FindUsersPageList(query, 10));
      UIPageIterator pageIterator = grid_.getUIPageIterator();
      if (pageIterator.getAvailable() == 0)
      {
         UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
         uiApp.addMessage(new ApplicationMessage("UISearchForm.msg.empty", null));
      }
   }
View Full Code Here

         String userName = event.getRequestContext().getRequestParameter(OBJECTID);
         OrganizationService service = uiListUser.getApplicationComponent(OrganizationService.class);
         UserACL userACL = uiListUser.getApplicationComponent(UserACL.class);
         if (userACL.getSuperUser().equals(userName))
         {
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIListUsers.msg.DeleteSuperUser", new String[]{userName},
               ApplicationMessage.WARNING));
            return;
         }
         UIPageIterator pageIterator = uiListUser.getChild(UIGrid.class).getUIPageIterator();
         int currentPage = pageIterator.getCurrentPage();
View Full Code Here

   {
      public void execute(Event<UIGroupManagement> event) throws Exception
      {
         UIGroupManagement uiGroupManagement = event.getSource();
         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApp = context.getUIApplication();
         uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.Edit", null));
      }
View Full Code Here

   {
      public void execute(Event<UIGroupManagement> event) throws Exception
      {
         UIGroupManagement uiGroupManagement = event.getSource();
         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApp = context.getUIApplication();

         UIGroupDetail uiGroupDetail = uiGroupManagement.getChild(UIGroupDetail.class);
         UIGroupExplorer uiGroupExplorer = uiGroupManagement.getChild(UIGroupExplorer.class);

         Group currentGroup = uiGroupExplorer.getCurrentGroup();
         if (currentGroup == null)
         {
            uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.Edit", null));
            return;
         }
         uiGroupDetail.setRenderedChild(UIGroupForm.class);
         UIGroupForm uiGroupForm = uiGroupDetail.getChild(UIGroupForm.class);
         uiGroupForm.setName("EditGroup");
View Full Code Here

         UIMembershipManagement uiMembershipManager = uiMembership.getParent();
         UIMembershipTypeForm uiForm = uiMembershipManager.getChild(UIMembershipTypeForm.class);
         uiForm.setMembershipType(mt);
         if (mt == null)
         {
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIMembershipTypeForm.msg.MembershipNotExist", new String[]{name}));
            uiMembership.loadData();
         }
      }
View Full Code Here

         UIMembershipTypeForm uiForm = membership.findFirstComponentOfType(UIMembershipTypeForm.class);

         String existMembershipTypeName = uiForm.getMembershipTypeName();
         if (existMembershipTypeName != null && existMembershipTypeName.equals(name))
         {
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIMembershipList.msg.InUse", null));
            return;
         }

         //  Check to see whether given membershiptype is mandatory or not
         UserACL acl = uiMembership.getApplicationComponent(UserACL.class);
         List<String> mandatories = acl.getMandatoryMSTypes();
         if (!mandatories.isEmpty() && mandatories.contains(name))
         {
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIMembershipList.msg.DeleteMandatory", null));
            return;
         }

         OrganizationService service = uiMembership.getApplicationComponent(OrganizationService.class);
         MembershipType membershipType = service.getMembershipTypeHandler().findMembershipType(name);
View Full Code Here

         if (uiForm.getMembershipTypeName() == null)
         {
            //For create new membershipType case
            if (mt != null)
            {
               UIApplication uiApp = event.getRequestContext().getUIApplication();
               uiApp.addMessage(new ApplicationMessage("UIMembershipTypeForm.msg.SameName", null));
               return;
            }
            mt = service.getMembershipTypeHandler().createMembershipTypeInstance();
            uiForm.invokeSetBindingBean(mt);
            service.getMembershipTypeHandler().createMembershipType(mt, true);
            uiMembershipManagement.addOptions(mt);
         }
         else
         {
            //For edit a membershipType case
            if (mt == null)
            {
               UIApplication uiApp = event.getRequestContext().getUIApplication();
               uiApp.addMessage(new ApplicationMessage("UIMembershipTypeForm.msg.MembershipNotExist",
                  new String[]{msTypeName}));
            }
            else
            {
               uiForm.invokeSetBindingBean(mt);
View Full Code Here

   {
      public void execute(Event<UIGroupManagement> event) throws Exception
      {
         UIGroupManagement uiGroupManagement = event.getSource();
         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApp = context.getUIApplication();
         UIGroupExplorer uiGroupExplorer = uiGroupManagement.getChild(UIGroupExplorer.class);
         Group currentGroup = uiGroupExplorer.getCurrentGroup();
         if (currentGroup == null)
         {
            uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.Edit", null));
            return;
         }
         UIGroupForm groupForm = uiGroupManagement.findFirstComponentOfType(UIGroupForm.class);
         if (groupForm.getGroupId() != null)
         {
            uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.Delete", null));
            return;
         }
         OrganizationService service = uiGroupManagement.getApplicationComponent(OrganizationService.class);
         UserACL acl = uiGroupManagement.getApplicationComponent(UserACL.class);
         List<String> mandatories = acl.getMandatoryGroups();
         if (!mandatories.isEmpty() && isMandatory(service.getGroupHandler(), currentGroup, mandatories))
         {
            uiApp.addMessage(new ApplicationMessage("UIGroupManagement.msg.DeleteMandatory", null));
            return;
         }
         String parentId = currentGroup.getParentId();
         service.getGroupHandler().removeGroup(currentGroup, true);
         uiGroupExplorer.changeGroup(parentId);
View Full Code Here

TOP

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

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.