Hi!
May be you can use Flow Handlers for this.
Code:
import org.springframework.webflow.core.collection.LocalAttributeMap;
import org.springframework.webflow.core.collection.MutableAttributeMap;
import org.springframework.webflow.mvc.servlet.AbstractFlowHandler;
public class UpdateProductFlowHandler extends AbstractFlowHandler {
@Override
public String getFlowId() {
/*
* Returns the id of the flow handled by this handler.
*/
return "updateProduct";
}
@Override
public MutableAttributeMap createExecutionInputMap(HttpServletRequest request) {
LocalAttributeMap attributeMap = new LocalAttributeMap();
/*
* Parse request attributes here and add them to attributeMap.
*/
return attributeMap;
}
}
and in springDispatcher-servlet.xml:
Code:
<bean name="updateProduct" class="your.package.UpdateProductFlowHandler" />
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<map>
<entry key="/product/*/edit.do" value-ref="updateProduct" />
</map>
</property>
</bean>