3 Replies Latest reply on Dec 19, 2007 7:28 PM by Karol Oslowski

    problems with seam 2.0.0GA and custom validation messages

    Karol Oslowski Newbie

      Hi all,

      I'm trying to do a simple thing. I'm having a backing bean with such methods:

      
       @NotNull(message="test")
       public String getLogin()
       {
       return login;
       }
      
       public void setLogin(String newLogin)
       {
       login = newLogin;
       }
      


      I'm also having a form (based on documentation):

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:s="http://jboss.com/products/seam/taglib">
      
       <div>
      
       <s:label styleClass="#{invalid?'error':''}">
       <ui:insert name="label"/>
       <s:span styleClass="required" rendered="#{required}">*</s:span>
       </s:label>
      
       <span class="#{invalid?'error':''}">
       <h:graphicImage src="img/error.gif" rendered="#{invalid}"/>
       <s:validateAll>
       <ui:insert/>
       </s:validateAll>
       </span>
      
       <s:message styleClass="error"/>
      
       </div>
      
      </ui:composition>
      


       <s:decorate id="loginDecoration" template="/templates/forms/validateField.xhtml">
       <ui:define name="label"><h:outputText value="#{messages.login}"/></ui:define>
       <h:inputText id="login" value="#{register.login}" required="true">
       <a4j:support ajaxSingle="true" event="onblur" reRender="loginDecoration" bypassUpdates="true"/>
       </h:inputText>
       </s:decorate>
      


      Unfortunatelly the custom message ain't displayed. Any1 has any suggestions what may be the cause?

      Thanks in advance,

      Karol