-
Jul 11th, 2006, 10:59 PM
#1
Not able to access form-bean in the Action class
Hi,
I am working on a SWF based wizard application.
I hv defined following entry in my application servlet xml:
<bean id="formAction" class="org.springframework.webflow.action.FormActi on">
<property name="formObjectName" value="inputCriteria"/>
<property name="formObjectClass" value="data.FormBeanObject"/>
<property name="formObjectScope" value="FLOW"/>
<property name="validator">
<bean class="domain.InputCriteriaValidator"/>
</property>
</bean>
I hv defined the services.xml as follows:
<beans>
<bean id="CreateService" class="domain.StubCreateService"/>
<bean id="queryAction" class="domain.QueryAction"/>
</beans>
I hv the following entry in my flow xml:
<action-state id="getForm2Details">
<action bean="queryAction"/>
<transition on="success" to="mbcSecond"/>
</action-state>
When i click on Next to navigate to page 2 of the wizard, the above flow is invoked. This causes the framework to invoke the method: public Event execute(RequestContext reqCtxt) in the class: domain.QueryAction
I hv a small piece of code in this method where i try to access the Form Bean object.
But i am getting it as 'null'.
HttpServletRequest request = ((ServletExternalContext)reqCtxt.getExternalContex t()).getRequest();
FormBeanObject formObj = (FormBeanObject) request.getAttribute("inputCriteria");
logger.debug("-----formObj---"+formObj);
Could anybody point any mistake here? Or is the formbean not accessible from the Action class? If yes, how do i access it?
Regards
arvind.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules