javaspringviewstateevaluatespring-webflow-2

Spring WebFlow do not trigger evaluate expression on state transition


I am using Spring 3.x and WebFlow 2.0. I am trying to submit the form with a new event id.

<view-state id="projectSearch"   view="project.projectSearch" model="searchCommand">

    <transition on="search" to="projectSearch" bind="true"  >
    <evaluate expression="formAction.findProjects(flowRequestContext, searchCommand)"/>
    </transition>

 </view-state>

and 

public Event findProjects(RequestContext context, SearchCommand command) throws Exception
{
   return success();
}

On form submit I set the event key to search. With above configuration I do not receive any request to findProject() method. But if I remove model="" attribute from view-state I get the request received by the method. In this case I do not get form values.

Can anybody please direct me the correct path.

Thanks, Vishal


Solution

  • It appeared to be jQuery for submit was causing the problem. If I comment the jQuery submit it works. I changed few lines and removed javascript need for form submit.