In the Web Flow below I bind form data to a flow variable (lifeCycleForm) on a submit event in the view state. I have verified that the name, label and description properties are all populated as expected.
However, when the expression in the action state is evaluated all three properties are null. My form bean is serializable and I am just using simple string properties.
What I am doing wrong?
I am pretty new to Spring WebFlow so I might have missed something obvious.
<var name="lifeCycleForm" class="com.btmatthews.freelancer.lifecycle.portlet.LifeCycleForm" />
<view-state id="createLifeCycle" model="lifeCycleForm">
<binder>
<binding property="name" required="true" />
<binding property="label" required="true" />
<binding property="description" required="false" />
</binder>
<transition on="submit" to="createLifeCycleAction" />
<transition on="cancel" to="lifeCycleCreationCancelled" bind="false" />
</view-state>
<action-state id="createLifeCycleAction">
<evaluate expression="lifeCycleService.createLifeCycle(lifeCycleForm.name, lifeCycleForm.label, lifeCycleForm.description, null, null)" />
<transition on="success" to="lifeCycleCreated" />
<transition on="failure" to="createLifeCycle" />
</action-state>
<end-state id="lifeCycleCreated" />
<end-state id="lifeCycleCreationCancelled" />
Update: I neglected to mention in my original posting that it was my unit tests that were failing. I have since learned that AbstractFlowExecutionTests does not implement binding of request parameters. This seems like a bit of an oversight to me. I have tried latest nightly Spring WebFlow 2.0.4 and the behaviour remains the same.
Update: My problems are that Spring WebFlow mocks do not simulate form submission.
Thanks in advance, Brian