Package org.exoplatform.webui.core

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


   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

         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

         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

      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

   {
      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

    public static class SelectPageActionListener extends EventListener<UIPageBrowser> {
        public void execute(Event<UIPageBrowser> event) throws Exception {
            UIPageBrowser uiPageBrowser = event.getSource();
            String id = event.getRequestContext().getRequestParameter(OBJECTID);
            WebuiRequestContext ctx = event.getRequestContext();
            UIApplication uiApp = ctx.getUIApplication();
            UIPageSelector uiPageSelector = uiPageBrowser.getAncestorOfType(UIPageSelector.class);
            UserPortalConfigService service = uiPageBrowser.getApplicationComponent(UserPortalConfigService.class);
            UserACL userACL = uiPageBrowser.getApplicationComponent(UserACL.class);
            if (!userACL.hasPermission(service.getPageService().loadPage(PageKey.parse(id)))) {
                uiApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.NoPermission", new String[] { id }));
            }
            uiPageSelector.setValue(id);
            // uiPageBrowser.feedDataWithQuery(null);

            UIForm uiForm = uiPageSelector.getAncestorOfType(UIForm.class);
View Full Code Here

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

            uiPermission.broadcast(event, event.getExecutionPhase());
View Full Code Here

            uiForm.setSelectedItem();

            // get item from selected item map
            Set<String> items = uiForm.uiIterator_.getSelectedItems();
            if (items.size() == 0) {
                UIApplication uiApp = uiForm.getAncestorOfType(UIApplication.class);
                uiApp.addMessage(new ApplicationMessage("UIUserSelector.msg.user-required", null));
                return;
            }
            String[] arrItems = items.toArray(new String[items.size()]);
            Arrays.sort(arrItems);
View Full Code Here

            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);
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.