tags:

views:

78

answers:

1

Hi all,

First of all, I don't know how can config restful url request for spring webflow, for example,how can I invoke my webflow when type address: http://localhost/app/order/edit/1002

It's easy to write spring mvc controller to handle this,but in case of webflow, I don't know how to pass parameters.

Can anybody help me? Thanks

A: 

Is the RequestPathFlowExecutorArgumentHandler what you're looking for?

Flow executor argument handler that extracts arguments from the request path and exposes them in the URL path.

This allows for REST-style URLs to launch flows in the general format: http://${host}/${context path}/${dispatcher path}/${flowId}

<bean id="flowController" class="org.springframework.webflow.executor.mvc.FlowController">
    <property name="flowExecutor" ref="flowExecutor" />
    <property name="argumentHandler">
        <bean class="org.springframework.webflow.executor.support.RequestPathFlowExecutorArgumentHandler" />
    </property>
</bean>
JoseK
Thanks,JoseK. I think that is what I want, but still wondering how to use the url like:http://localhost/app/order/edit/1002 to start a flow to eidt order 1002? Could you please give some sample code?
Tom
By the way, I am using spring webflow 2.1.1,I didn't found class org.springframework.webflow.executor.mvc.FlowController and class org.springframework.webflow.executor.support.RequestPathFlowExecutorArgumentHandler in spring-webflow-2.1.1.RELEASE.jar
Tom
See **6.8.3. Spring MVC Context** here http://static.springsource.org/spring-webflow/docs/1.0.x/reference/practical.html
JoseK
Your link is based on 1.0.x,not my version.
Tom