I am getting the following stacktrace:
The annoying part is that I copied most of the stuff from another flow that is working fine. Its probably an obvious copy/paste error or something I forgot to change but I have been looking at this for longer than I would like to admit and can't see whats wrong....I need another set of eyes...Code:java.lang.IllegalStateException: Neither BindingResult nor plain target object for bean name 'searchBean' available as request attribute at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:137) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:179) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.resolveCssClass(AbstractHtmlElementTag.java:502)
heres the search-flow.xml:
heres the bean:Code:<start-state idref="search"/> <view-state id="search" view="searchpage"> <render-actions> <action bean="formAction" method="setupForm"/> </render-actions> <transition on="search" to="searchresults"> <action bean="formAction" method="bindAndValidate"/> </transition> <transition on="main" to="mainmenu"> <action bean="formAction" method="bindAndValidate"/> </transition> </view-state>
heres the search-flow-beans.xml:Code:public class SearchBean implements Serializable { /** Logger for this class and subclasses */ protected final Log logger = LogFactory.getLog(getClass()); private String name = ""; public String getName() { return name; } public void setName(String name) { this.name = name; } public String toString() { String retVal = "name: " + name + "\n\n"; return retVal; } }
heres the jsp:Code:<bean id="formAction" class="org.springframework.webflow.action.FormAction"> <property name="formObjectClass" value="com.xactsites.producty.bus.SearchBean"/> <property name="formObjectName" value="searchBean"/> <property name="formObjectScope" value="FLOW"/> <property name="validator"> <bean class="com.xactsites.producty.bus.SearchBeanValidator"/> </property> </bean>
This is a very simple case so I don't know why I can't figure out why the form backing object isn't found. I am puzzled.Code:<form:form commandName="searchBean" method="post"> <table bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5"> <tr> <td>Name: </td> <td><form:input path="name"/></td> </tr> </table> <br> <spring:hasBindErrors name="searchBean"> <b>Please enter a name</b> </spring:hasBindErrors> <br> <br> <input type="hidden" name="_flowExecutionKey" value="${flowExecutionKey}"> <input type="submit" class="button" value="Search"> <input type="hidden" name="_eventId" value="search"> </form:form>
Thanks in advance.


Reply With Quote