Hi guys. I'm sure I'm doing something really dumb, but the solution isn't obvious to me.
My problem is that I have a simple portlet with a PortletModeHandlerMapping that maps the view mode to one Controller, and the edit view to a SimpleFormController.
When I first enter the page, I get the view handler ok, and when I first enter the edit mode I get the formView of the SimpleFormController. After entering data and submitting it, I get the successView. I use the portal's controls to return to the view mode.
The problem is that if I now return to the edit view, I'm presented with the successView! Of course, I want the formView, so that I can enter a second set of data.
Here's my context file (there's some other data in another context file, but I think everything relevant is here):
Thanks for your help!Code:<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "../../dtd/spring-beans.dtd"> <beans> <bean id="postItFrontPageController" class="org.gibby.sample.portlets.messaging.web.PostItFrontPageController"> <property name="postManager"> <ref bean="postManager"/> </property> </bean> <bean id="postItPostController" class="org.gibby.sample.portlets.messaging.web.PostItPostController"> <property name="sessionForm"><value>true</value></property> <property name="commandName"><value>post</value></property> <property name="commandClass"><value>org.gibby.sample.portlets.messaging.bus.Post</value></property> <property name="formView"><value>postItForm</value></property> <property name="successView"><value>postItSuccess</value></property> <property name="postManager"> <ref bean="postManager"/> </property> </bean> <!-- Handler Mapping --> <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping"> <property name="order" value="20"/> <property name="portletModeMap"> <map> <entry key="view"><ref bean="postItFrontPageController"/></entry> <entry key="edit"><ref bean="postItPostController"/></entry> </map> </property> </bean> </beans>
David


Reply With Quote