Validation fails for inputText fields where the value expression is of the form:
#{entity[fieldName]}
This issue should have been fixed in Seam 1.3.0.ALPHA, but for me, this still doe not work
as expected! Everything works smoothly as long as the data entered is valid. But if I
enter invalid data, a hibernate validation exception is shown on a seam debug page instead
of the form being rendered again with error message decorations. The effect is the same as
if I had omitted the <s:validate/> (resp. <s:validateAll>) tags.
The problem not only shows up in conjunction with #{entity[fieldName]} but also when you
use a variable that has been assigned with the JSTL <c:set> tag before as shown in
the snippet below.
{code}
<c:set var="field" value="#{fooHome.instance.name}" />
<s:decorate id="nameDecoration">
<s:label ...</s:label>
<span class="value #{invalid?'errors':''}">
<s:validateAll>
<h:inputText id="name" required="true"
value="#{field}"/>
</s:validateAll>
<s:message styleClass="error errors"/>
</s:decorate>
{code}
the exception:
Exception during request processing:
Caused by javax.servlet.ServletException with message: "#{fooHome.persist}:
org.hibernate.validator.InvalidStateException: validation failed for:
ch.XXXXXX.ttrack.Foo"
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056378#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...