Package org.exoplatform.webui.exception

Examples of org.exoplatform.webui.exception.MessageException


         if (Character.isDigit(c) || (s.charAt(0) == '-' && i == 0 && s.length() > 1))
         {
            continue;
         }
         Object[] args = {label};
         throw new MessageException(new ApplicationMessage("NumberFormatValidator.msg.Invalid-number", args));
      }
   }
View Full Code Here


      catch (Exception e)
      {
         label = uiInput.getName();
      }
      Object[] args = {label};
      throw new MessageException(new ApplicationMessage(key_, args, ApplicationMessage.WARNING));
   }
View Full Code Here

         return;
      String s = (String)uiInput.getValue();
      if (s.matches(EMAIL_REGEX))
         return;
      Object[] args = {label};
      throw new MessageException(new ApplicationMessage("EmailAddressValidator.msg.Invalid-input", args,
         ApplicationMessage.WARNING));
   }
View Full Code Here

      }
      String s = (String)uiInput.getValue();
      if (Character.isDigit(s.charAt(0)) || s.charAt(0) == '-')
      {
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("FirstAndSpecialCharacterNameValidator.msg", args,
            ApplicationMessage.WARNING));
      }
      for (int i = 0; i < s.length(); i++)
      {
         char c = s.charAt(i);
         if (Character.isLetter(c) || Character.isDigit(c) || c == '_' || c == '-')
         {
            continue;
         }
         Object[] args = {label};
         throw new MessageException(new ApplicationMessage("IdentifierValidator.msg.Invalid-char", args,
            ApplicationMessage.WARNING));
      }
   }
View Full Code Here

         Date stDate = sdf.parse(s);
         s = stFormat.format(stDate);
      }
      catch (Exception e)
      {
         throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
      }
      if (s.matches(DATETIME_REGEX) && isValidDateTime(s))
         return;

      throw new MessageException(new ApplicationMessage("DateTimeValidator.msg.Invalid-input", args));
   }
View Full Code Here

      catch (Exception e)
      {
         label = uiInput.getName();
      }
      Object[] args = {label};
      throw new MessageException(new ApplicationMessage(key_, args, ApplicationMessage.WARNING));
   }
View Full Code Here

            error = true;
            continue;
         }
         error = false;
         Object[] args = {label, uiInput.getBindingField()};
         throw new MessageException(new ApplicationMessage("NumberFormatValidator.msg.Invalid-number", args));
      }
      if (error == true && s.charAt(0) == '-')
      {
         Object[] args = {label};
         throw new MessageException(new ApplicationMessage("PositiveNumberFormatValidator.msg.Invalid-number", args));
      }
   }
View Full Code Here

        public void validate(UIFormInput uiInput) throws Exception {
            UIFormInputContainer uiInputContainer = (UIFormInputContainer) uiInput;
            String value = (String) uiInputContainer.getValue();
            if (value == null || value.trim().length() < 1) {
                String[] args = { "UITabPane.title.UIPermissionSelector" };
                throw new MessageException(new ApplicationMessage("MandatoryValidatorIterator.msg.empty", args,
                        ApplicationMessage.INFO));
            }
        }
View Full Code Here

                return;
            }
            UIFormPageIterator uiInputIterator = uiInputContainer.findFirstComponentOfType(UIFormPageIterator.class);
            if (uiInputIterator.getAvailable() < 1) {
                String[] args = { "UITabPane.title.UIListPermissionSelector" };
                throw new MessageException(new ApplicationMessage("EmptyIteratorValidator.msg.empty", args,
                        ApplicationMessage.INFO));
            }
        }
View Full Code Here

      }
      label = label.trim();
      if (label.charAt(label.length() - 1) == ':')
         label = label.substring(0, label.length() - 1);
      Object[] args = {label, uiInput.getBindingField()};
      throw new MessageException(new ApplicationMessage("EmptyFieldValidator.msg.empty-input", args,
         ApplicationMessage.WARNING));
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.webui.exception.MessageException

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.