Details
-
Type:
Bug
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.3.0
-
Fix Version/s: None
-
Component/s: Core: Flow Engine: Flow Builder, Core: Flow Executor
-
Labels:None
Description
<view-state id="test" view="test" model="testForm">
<transition on="#
" validate="false">
<evaluate expression="...." />
<render fragments="...." />
</transition>
<transition on="#
{T(my.super.package.TestFormEvent).SAVE.getValue()}" to="...">
<evaluate expression="...." />
</transition>
</view-state>
If I'm using an EL expression for the transition 'on' attribute; the 'validate' attribute is ignored and the model is validated!
I've got a Java Enum for my different transition events to be able to handle nicely different validation based on a specific transition.
public void validate(ValidationContext validationContext) {
switch (TestFormEvent.find(validationContext.getUserEvent()))
{ case SAVE: // do some validations on top of the JSR 303 break; case UPDATE_STUFF: // do some different validation break; }}
The different type of validations is to manage my child AJAX forms.
The work around for this issue; is to clear the message context on my FETCH_STUFF event. It'll be far better if SWF handles correctly the transition parsing so the validation is not processed.