Examples of UIApplication


Examples of net.rim.device.api.ui.UiApplication

    contextMenu.addItem(deleteItem);
  }

  void pushScreen(Screen s) {
    Screen screen = getScreen();
    UiApplication app = (UiApplication) screen.getApplication();
    app.pushScreen(s);
  }
View Full Code Here

Examples of net.rim.device.api.ui.UiApplication

      sInitialized = true;
    }
  }

  private static void startApplication(Uri uri) {
    UiApplication app = new AuthenticatorApplication();
    AuthenticatorScreen screen = new AuthenticatorScreen();
    app.pushScreen(screen);
    if (uri != null) {
      screen.parseSecret(uri);
      screen.refreshUserList();
    }
    app.enterEventDispatcher();
  }
View Full Code Here

Examples of net.rim.device.api.ui.UiApplication

    mUsers[position] = currentPin;
    return currentPin.mPin;
  }

  private void pushScreen(Screen screen) {
    UiApplication app = (UiApplication) getApplication();
    app.pushScreen(screen);
  }
View Full Code Here

Examples of org.exoplatform.portal.webui.application.UIApplication

        ) })
public class UIPagePreview extends UIComponentDecorator {
    public boolean isPageHasApplication() {
        if (uicomponent_ == null)
            return false;
        UIApplication existingApp = uicomponent_.findFirstComponentOfType(UIApplication.class);
        if (existingApp != null)
            return true;

        return false;
    }
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

         Integer navId = Integer.parseInt(id);
         // get PageNavigation by navigation id
         PageNavigation navigation = uicomp.getNavigationById(navId);
         uicomp.setSelectedNavigation(navigation);
         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApplication = context.getUIApplication();

         // check edit permission, ensure that user has edit permission on that
         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }

         UIPopupWindow popUp = uicomp.getChild(UIPopupWindow.class);
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

      public void execute(Event<UIGroupNavigationManagement> event) throws Exception
      {
         UIGroupNavigationManagement uicomp = event.getSource();

         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApplication = context.getUIApplication();

         // get navigation id
         String id = event.getRequestContext().getRequestParameter(OBJECTID);
         Integer navId = Integer.parseInt(id);

         // get PageNavigation by navigation id
         PageNavigation navigation = uicomp.getNavigationById(navId);

         // check edit permission, ensure that user has edit permission on that
         // navigation
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);

         if (!userACL.hasEditPermission(navigation))
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.Invalid-editPermission", null));
            return;
         }

         // TODO ensure this navigation is exist
         DataStorage service = uicomp.getApplicationComponent(DataStorage.class);
         if (service.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId()) == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UIGroupNavigationManagement.msg.navigation-not-exist", null));
            return;
         }

         // remove selected navigation
         if (uicomp.navigations == null || uicomp.navigations.size() < 1)
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

      {
         UISiteManagement uicomp = event.getSource();
         String portalName = event.getRequestContext().getRequestParameter(OBJECTID);
         DataStorage dataService = uicomp.getApplicationComponent(DataStorage.class);
         WebuiRequestContext context = event.getRequestContext();
         UIApplication uiApplication = context.getUIApplication();
        
         //Minh Hoang TO: User could edit navigation if he/she has edit permissions on PortalConfig. That is not
         //at all logical and should be modified after release 3.1 GA
         UserPortalConfigService configService = uicomp.getApplicationComponent(UserPortalConfigService.class);
         UserPortalConfig userPortalConfig = configService.getUserPortalConfig(portalName, context.getRemoteUser());
         if(userPortalConfig == null)
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.portal-not-exist",
               new String[]{portalName}));
            return;
         }
        
         UserACL userACL = uicomp.getApplicationComponent(UserACL.class);
         if (!userACL.hasEditPermission(userPortalConfig.getPortalConfig()))
         {
            uiApplication.addMessage(new ApplicationMessage("UISiteManagement.msg.Invalid-editPermission", null));;
            return;
         }
        
         PageNavigation edittedNavigation = dataService.getPageNavigation(PortalConfig.PORTAL_TYPE, portalName);
        
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

   {
      public void execute(Event<UIRightClickPopupMenu> event) throws Exception
      {
        String uri = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
        WebuiRequestContext pcontext = event.getRequestContext();
          UIApplication uiApp = pcontext.getUIApplication();
          UINavigationNodeSelector uiNodeSelector = event.getSource().getAncestorOfType(UINavigationNodeSelector.class);
          UINavigationManagement uiManagement = uiNodeSelector.getParent();
          Class<?>[] childrenToRender = new Class<?>[]{UINavigationNodeSelector.class};
          uiManagement.setRenderedChildrenOfTypes(childrenToRender);
          event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);

          PageNavigation nav = uiNodeSelector.getEdittedNavigation();
          if (nav == null)
          {
             return;
          }
         
          PageNode[] pageNodes = PageNavigationUtils.searchPageNodesByUri(nav, uri);
          if (pageNodes == null)
          {
             return;
          }
         
          for (PageNode pageNode : pageNodes) {
         if(pageNode != null && pageNode.isSystem()) {
           uiApp.addMessage(new ApplicationMessage("UINavigationNodeSelector.msg.systemnode-move", null));
           return;
         }
          }
         
          TreeNodeData selectedNode = new TreeNodeData(nav, pageNodes[0], pageNodes[1]);
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

         PageNavigation targetNav = uiNodeSelector.getEdittedNavigation();
         PageNode targetNode = PageNavigationUtils.searchPageNodeByUri(targetNav, targetUri);

         if (targetNode != null && newNode.getUri().equals(targetNode.getUri()))
         {
            UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIPageNodeSelector.msg.paste.sameSrcAndDes", null));
            return;
         }

         if (isExistChild(targetNode, newNode) || (targetNode == null && isExitChild(targetNav, newNode)))
         {
            UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
            uiApp.addMessage(new ApplicationMessage("UIPageNodeSelector.msg.paste.sameName", null));
            return;
         }
         if (selectedNode.isDeleteNode())
         {
            if (selectedNode.getParentNode() != null)
View Full Code Here

Examples of org.exoplatform.webui.core.UIApplication

   {
      public void execute(Event<UIRightClickPopupMenu> event) throws Exception
      {
         String uri = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
         WebuiRequestContext pcontext = event.getRequestContext();
         UIApplication uiApp = pcontext.getUIApplication();
         UINavigationNodeSelector uiNodeSelector = event.getSource().getAncestorOfType(UINavigationNodeSelector.class);
         pcontext.addUIComponentToUpdateByAjax(uiNodeSelector);

         PageNavigation nav = uiNodeSelector.getEdittedNavigation();
         if (nav == null)
         {
            return;
         }

         ParentChildPair parentChildPair = PageNavigationUtils.searchParentChildPairByUri(nav, uri);
         if (parentChildPair == null)
         {
            return;
         }

         PageNode parentNode = parentChildPair.getParentNode();
         PageNode childNode = parentChildPair.getChildNode();
        
         if(childNode.isSystem()) {
            uiApp.addMessage(new ApplicationMessage("UINavigationNodeSelector.msg.systemnode-delete", null));
            return;
          }
         
         if(parentNode == null)
         {
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.