Examples of WebuiRequestContext


Examples of org.exoplatform.webui.application.WebuiRequestContext

   static public class DeleteTabActionListener extends EventListener<UITabPaneDashboard>
   {
      public void execute(Event<UITabPaneDashboard> event) throws Exception
      {
         UITabPaneDashboard source = event.getSource();
         WebuiRequestContext context = event.getRequestContext();
         int removedNodeIndex = Integer.parseInt(context.getRequestParameter(UIComponent.OBJECTID));
         PageNode selectedNode = source.removePageNode(removedNodeIndex);

         //If the node is removed successfully, then redirect to the node specified by tab on the left
         if (selectedNode != null)
         {
View Full Code Here

Examples of org.exoplatform.webui.application.WebuiRequestContext

   static public class AddDashboardActionListener extends EventListener<UITabPaneDashboard>
   {
      public void execute(Event<UITabPaneDashboard> event) throws Exception
      {
         UITabPaneDashboard tabPane = event.getSource();
         WebuiRequestContext context = event.getRequestContext();
         String newTabLabel = context.getRequestParameter(UIComponent.OBJECTID);
         if (!tabPane.validateName(newTabLabel))
         {
            //TODO nguyenanhkien2a@gmail.com
            //We should redirect to current node while adding new tab fails
            PageNode currentNode = tabPane.uiPortal.getSelectedNode();
            PortalRequestContext prContext = Util.getPortalRequestContext();
            prContext.getResponse().sendRedirect(prContext.getPortalURI() + currentNode.getUri());
           
            Object[] args = {newTabLabel};
            context.getUIApplication().addMessage(new ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
            return;
         }
         String uri = tabPane.createNewPageNode(newTabLabel);

         //If new node is created with success, then redirect to it
View Full Code Here

Examples of org.exoplatform.webui.application.WebuiRequestContext

      final public static String RENAMED_TAB_LABEL_PARAMETER = "newTabLabel";

      public void execute(Event<UITabPaneDashboard> event) throws Exception
      {
         UITabPaneDashboard tabPane = event.getSource();
         WebuiRequestContext context = event.getRequestContext();
         int nodeIndex = Integer.parseInt(context.getRequestParameter(UIComponent.OBJECTID));
         String newTabLabel = context.getRequestParameter(RENAMED_TAB_LABEL_PARAMETER);
         if (!tabPane.validateName(newTabLabel))
         {
            //TODO nguyenanhkien2a@gmail.com
            //We should redirect to current node while renaming fails
            PageNode currentNode = tabPane.uiPortal.getSelectedNode();
            PortalRequestContext prContext = Util.getPortalRequestContext();
            prContext.getResponse().sendRedirect(prContext.getPortalURI() + currentNode.getUri());
           
            Object[] args = {newTabLabel};
            context.getUIApplication().addMessage(new ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
            return;
         }
         String newUri = tabPane.renamePageNode(nodeIndex, newTabLabel);

         //If page node is renamed with success, then redirect to new URL
View Full Code Here

Examples of org.exoplatform.webui.application.WebuiRequestContext

      final public static String TARGETED_TAB_PARAMETER = "targetedTab";

      public void execute(Event<UITabPaneDashboard> event) throws Exception
      {
         UITabPaneDashboard tabPane = event.getSource();
         WebuiRequestContext context = event.getRequestContext();
         int dragingTabIndex = Integer.parseInt(context.getRequestParameter(UIComponent.OBJECTID));
         int targetedTabIndex = Integer.parseInt(context.getRequestParameter(TARGETED_TAB_PARAMETER));

         //If two nodes are permuted, then update the tab pane
         if (tabPane.permutePageNode(dragingTabIndex, targetedTabIndex))
         {
            context.addUIComponentToUpdateByAjax(tabPane);
         }
      }
View Full Code Here

Examples of org.exoplatform.webui.application.WebuiRequestContext

         PortalRequestContext prContext = Util.getPortalRequestContext();
         UIRegisterForm registerForm = event.getSource();
         OrganizationService orgService = registerForm.getApplicationComponent(OrganizationService.class);
         UserHandler userHandler = orgService.getUserHandler();
         WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
         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

Examples of org.exoplatform.webui.application.WebuiRequestContext

            event.getRequestContext().getUIApplication().addMessage(e.getDetailMessage());
            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));
         }
View Full Code Here

Examples of org.exoplatform.webui.application.WebuiRequestContext

   static public class SelectGroupMessageActionListener extends EventListener<UIGroupManagement>
   {
      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

Examples of org.exoplatform.webui.application.WebuiRequestContext

   static public class EditGroupActionListener extends EventListener<UIGroupManagement>
   {
      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();
View Full Code Here

Examples of org.exoplatform.webui.application.WebuiRequestContext

   static public class DeleteGroupActionListener extends EventListener<UIGroupManagement>
   {
      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));
View Full Code Here

Examples of org.exoplatform.webui.application.WebuiRequestContext

      public void execute(Event<UIAddApplicationForm> event) throws Exception
      {
         UIAddApplicationForm uiForm = event.getSource();
         UIApplicationOrganizer uiOrganizer = uiForm.getParent();
         WebuiRequestContext ctx = event.getRequestContext();
         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);
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.