Pages

Saturday, February 18, 2012

Spring WebFlow Validation part 2

Using JSR-303 validation model would be nice, but it appears that SWF2.3 doesn't support validation groups, which are essential in a wizard-like interface I'm implementing (JIRA SWF-1453).
I think that I'm having all those validation problems because my model is flow bound (I'm using flowScope prefix for model name). For example spring:hasBindingErrors only works when name is "flowScope.userData".
What's more interesting in
<view-state id="stateOne" model="flowScope.userData">
...
</view-state>

<form:form commandName="userData" method="POST">
  <form:input path="data.value"/>
  <form:errors path="data.value"/>
</form:form>
form:input works fine. Only form:errors refuses to bind.
I'm gonna keep poking it until I figure out what's going on.

No comments: