Examples of UIApplication


Examples of org.exoplatform.webui.core.UIApplication

         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

Examples of org.exoplatform.webui.core.UIApplication

         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

Examples of org.exoplatform.webui.core.UIApplication

         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

Examples of org.exoplatform.webui.core.UIApplication

   {
      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

Examples of org.exoplatform.webui.core.UIApplication

         String type = uiForm.getUIFormSelectBox(UIAddApplicationForm.FIELD_TYPE).getValue();
         uiForm.setApplicationList(type);
         uiForm.getChild(UIFormTableIteratorInputSet.class).setRendered(true);
         if (uiForm.getApplications().size() == 0)
         {
            UIApplication uiApp = event.getRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIAddApplicationForm.msg.typeNoApps", null));
            event.getRequestContext().addUIComponentToUpdateByAjax(uiApp.getUIPopupMessages());
            uiForm.getChild(UIFormTableIteratorInputSet.class).setRendered(false);
         }
         event.getRequestContext().addUIComponentToUpdateByAjax(uiForm);
      }
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

   static public 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);
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

         ApplicationRegistryService appRegService = uiForm.getApplicationComponent(ApplicationRegistryService.class);
         ApplicationCategory selectedCate = uiOrganizer.getSelectedCategory();
         if (appRegService.getApplicationCategory(selectedCate.getName()) == null)
         {
            uiOrganizer.reload();
            UIApplication uiApp = ctx.getUIApplication();
            uiApp.addMessage(new ApplicationMessage("category.msg.changeNotExist", null));
            ctx.addUIComponentToUpdateByAjax(uiOrganizer);
            return;
         }

         UIFormRadioBoxInput uiRadio = uiForm.getUIInput("application");
         String displayName = uiForm.getUIStringInput(FIELD_NAME).getValue();
         if (uiForm.getApplications().size() == 0)
         {
            ctx.getUIApplication().addMessage(new ApplicationMessage("UIAddApplicationForm.msg.appNotExists", null));
            ctx.addUIComponentToUpdateByAjax(uiOrganizer);
            return;
         }
         Application tmp = uiForm.getApplications().get(Integer.parseInt(uiRadio.getValue()));

         // check portet name is exist
         if (appRegService.getApplication(selectedCate.getName(), tmp.getApplicationName()) != null)
         {
            WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
            UIApplication uiApp = context.getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIAddApplicationForm.msg.PortletExist", null));
            return;
         }

         Application app = cloneApplication(tmp);
         UIApplicationRegistryPortlet.setPermissionToEveryone(app);
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

         if (uiEditor != null)
         {
            Source source = uiEditor.getSource();
            if (source != null && name.equals(uiEditor.getSourceName()))
            {
               UIApplication uiApp = ctx.getUIApplication();
               uiApp.addMessage(new ApplicationMessage("UIGadgetManagement.msg.deleteGadgetInUse", null));
               return;
            }
         }
         service.removeGadget(name);
         WebAppController webController = uiManagement.getApplicationComponent(WebAppController.class);
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

      ApplicationRegistryService service = getApplicationComponent(ApplicationRegistryService.class);
      application_.setModifiedDate(Calendar.getInstance().getTime());
      WebuiRequestContext ctx = WebuiRequestContext.getCurrentInstance();
      if (service.getApplication(application_.getId()) == null)
      {
         UIApplication uiApp = ctx.getUIApplication();
         uiApp.addMessage(new ApplicationMessage("application.msg.changeNotExist", null));
         return;
      }
      service.update(application_);
      Application selectedApplication = getApplication();
      UIApplicationOrganizer uiApplicationOrganizer = getAncestorOfType(UIApplicationOrganizer.class);
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

   {
      String url = getUrl();
      if (url == null)
      {
         WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
         UIApplication uiApplication = context.getUIApplication();
         uiApplication.addMessage(new ApplicationMessage("UIGadgetPortlet.msg.url-invalid", null));
      }

      String metadata_ = GadgetUtil.fetchGagdetMetadata(url);
      try
      {
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.