The issue I am having now is my command object is empty when referenced from an Ajax Event Handler. I understand the Ajax code extends from the BaseCommandController, and web flow does not, and is causing my issue. I was wondering if there is anyway to bridge the gap between the two so that during the flow, when I use an Ajax event handler, I have access to the flows command object.
During my flow I have a button click that fires off an Ajax Event Handler using the code below.
.jsp page
Code:
<input type="button" value="Press" onclick="doAjaxAction('loadOffices', this);">
<select id="offices">
<option>--- ---</option>
</select>
event handler code (note: orderForm is always null)
Code:
public class OrderAjaxActions extends AbstractAjaxHandler{
public AjaxResponse loadOffices(AjaxActionEvent event) {
OrderForm orderForm = (OrderForm) event.getCommandObject();
…..
order-flow-beans.xml
Code:
<beans>
<bean id="formAction" class="com.mktg.form.OrderFormAction">
<property name="formObjectName" value="orderForm"/>
<property name="formObjectClass" value="com.hwa.form.OrderForm"/>
<property name="formObjectScope" value="CONVERSATION"/>
....
Thanks for your help,
Keith