Examples of UIComponent


Examples of org.exoplatform.webui.core.UIComponent

   static private final String EMAIL_REGEX = "[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[_A-Za-z0-9-.]+";

   public void validate(UIFormInput uiInput) throws Exception
   {
      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

   public void validate(UIFormInput uiInput) throws Exception
   {
      if (uiInput.getValue() == null || ((String)uiInput.getValue()).trim().length() == 0)
         return;
      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

            return;
         }
      }

      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

   public void validate(UIFormInput uiInput) throws Exception
   {
      if (uiInput.getValue() == null || ((String)uiInput.getValue()).length() == 0)
         return;
      //  modified by Pham Dinh Tan
      UIComponent uiComponent = (UIComponent)uiInput;
      UIForm uiForm = uiComponent.getAncestorOfType(UIForm.class);
      String label;
      try
      {
        label = uiForm.getId() + ".label." + uiInput.getName();
      }
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

   public void processDecode(UIComponent uicomponent, WebuiRequestContext context) throws Exception
   {
      String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
      if (componentId == null || componentId.length() == 0)
         return;
      UIComponent uiTarget = uicomponent.findComponentById(componentId);
      //TODO to avoid exception
      if (uiTarget == null)
         return;
      else if (uiTarget == uicomponent)
         super.processDecode(uicomponent, context);
      else
         uiTarget.processDecode(context);
   }
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

   public void processAction(UIComponent uicomponent, WebuiRequestContext context) throws Exception
   {
      String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
      if (componentId != null)
      {
         UIComponent uiTarget = uicomponent.findComponentById(componentId);
         if (uiTarget == uicomponent)
            super.processAction(uicomponent, context);
         else if (uiTarget != null)
            uiTarget.processAction(context);
      }
   }
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

         UIUserManagement uiUserManager = uiListUsers.getParent();
         UIUserInfo uiUserInfo = uiUserManager.getChild(UIUserInfo.class);
         uiUserInfo.setUser(username);
         uiUserInfo.setRendered(true);

         UIComponent uiToUpdateAjax = uiListUsers.getAncestorOfType(UIUserManagement.class);
         event.getRequestContext().addUIComponentToUpdateByAjax(uiToUpdateAjax);
      }
View Full Code Here

Examples of org.exoplatform.webui.core.UIComponent

         service.getUserHandler().removeUser(userName, true);
         uiListUser.search(uiListUser.lastQuery_);
         while (currentPage > pageIterator.getAvailablePage())
            currentPage--;
         pageIterator.setCurrentPage(currentPage);
         UIComponent uiToUpdateAjax = uiListUser.getAncestorOfType(UIUserManagement.class);
         event.getRequestContext().addUIComponentToUpdateByAjax(uiToUpdateAjax);
      }
View Full Code Here

Examples of org.gatein.mop.api.workspace.ui.UIComponent

               }
            }
         }

         //
         UIComponent dstChild;
         if (srcChildId != null)
         {
            dstChild = session.findObjectById(ObjectType.COMPONENT, srcChildId);
            if (dstChild == null)
            {
               throw new StaleModelException("Could not find supposed present child with id " + srcChildId);
            }

            // julien : this can fail due to a bug in chromattic not implementing equals method properly
            // and is replaced with the foreach below
            /*
                    if (!dst.contains(dstChild)) {
                      throw new IllegalArgumentException("Attempt for updating a ui component " + session.pathOf(dstChild) +
                        "that is not present in the target ui container " + session.pathOf(dst));
                    }
            */
            boolean found = false;
            for (UIComponent child : dst.getComponents())
            {
               if (child.getObjectId().equals(srcChildId))
               {
                  found = true;
                  break;
               }
            }

            //
            if (!found)
            {
               if (hierarchyRelationships.containsKey(srcChildId))
               {
                  String srcId = hierarchyRelationships.get(srcChildId);

                  // It's a move operation, so we move the node first
                  dst.getComponents().add(dstChild);

                  //
                  changes.add(new ModelChange.Move(srcId, dst.getObjectId(), srcChildId));
               }
               else
               {
                     throw new IllegalArgumentException("Attempt for updating a ui component " + session.pathOf(dstChild)
                     + " that is not present in the target ui container " + session.pathOf(dst));
               }
            }

            //
            changes.add(new ModelChange.Update(srcChild));
         }
         else
         {
            String name = srcChild.getStorageName();
            if (name == null)
            {
               // We manufacture one name
               name = UUID.randomUUID().toString();
            }
            if (srcChild instanceof ContainerData)
            {
               dstChild = dst.add(ObjectType.CONTAINER, name);
            }
            else if (srcChild instanceof ApplicationData)
            {
               dstChild = dst.add(ObjectType.WINDOW, name);
            }
            else if (srcChild instanceof BodyData)
            {
               dstChild = dst.add(ObjectType.BODY, name);
            }
            else
            {
               throw new StaleModelException("Was not expecting child " + srcChild);
            }
            changes.add(new ModelChange.Create(dst.getObjectId(), srcChild));
         }

         //
         save(srcChild, dstChild, changes, hierarchyRelationships);

         //
         String dstChildId = dstChild.getObjectId();
         modelObjectMap.put(dstChildId, srcChild);
         orders.add(dstChildId);
      }

      // Take care of move operation that could be seen as a remove otherwise
      for (UIComponent dstChild : dst.getComponents())
      {
         String dstChildId = dstChild.getObjectId();
         if (!modelObjectMap.containsKey(dstChildId))
         {
            String parentId = hierarchyRelationships.get(dstChildId);
            if (parentId != null)
            {
               // Get the new parent
               UIContainer parent = session.findObjectById(ObjectType.CONTAINER, parentId);

               // Perform the move
               parent.getComponents().add(dstChild);

               //
               changes.add(new ModelChange.Move(dst.getObjectId(), parentId, dstChildId));

               // julien : we do not need to create an update operation
               // as later the update operation will be created when the
               // object
               // will be processed
            }
         }
      }

      // Delete removed children
      for (Iterator<UIComponent> i = dst.getComponents().iterator(); i.hasNext();)
      {
         UIComponent dstChild = i.next();
         String dstChildId = dstChild.getObjectId();
         if (!modelObjectMap.containsKey(dstChildId))
         {
            i.remove();
            changes.add(new ModelChange.Destroy(dstChildId));
         }
View Full Code Here

Examples of org.jibeframework.core.annotation.UIComponent

        } else {
          args[i] = arg;
        }
      }
      if (args[i] == null) {
        UIComponent uiCmpAnn = parameters[i].getParameterAnnotation(UIComponent.class);
        if (uiCmpAnn != null) {
          args[i] = applicationContext.getBean(uiCmpAnn.value());
        } else {
          UIController cntAnn = parameters[i].getParameterAnnotation(UIController.class);
          if (cntAnn != null) {
            args[i] = applicationContext.getBean(cntAnn.value());
          }
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.