Package org.crank.validation

Examples of org.crank.validation.ValidatorMessage


   * @param imessage
   */
  private void convertMessageToFacesMessages(ValidatorMessageHolder imessage,
      FacesContext facesContext, UIComponent component) {
    if (imessage instanceof ValidatorMessage) {
      ValidatorMessage message = (ValidatorMessage) imessage;
      if (message.hasError()) {
        throw new ValidatorException(
            convertMessageToFacesMessage(message));
      }
    } else if (imessage instanceof ValidatorMessages) {
      ValidatorMessages messages = (ValidatorMessages) imessage;
      for (ValidatorMessage message : messages) {
        if (message.hasError()) {
          facesContext.addMessage(
              component.getClientId(facesContext),
              convertMessageToFacesMessage(message));
          UIInput uiComponent = (UIInput) component;
          uiComponent.setValid(false);
View Full Code Here

TOP

Related Classes of org.crank.validation.ValidatorMessage

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.