org.springframework.web.portlet.handler
public class: ParameterHandlerMapping [javadoc |
source]
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.portlet.handler.AbstractHandlerMapping
org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping
org.springframework.web.portlet.handler.ParameterHandlerMapping
All Implemented Interfaces:
HandlerMapping, Ordered, ApplicationContextAware
Implementation of the
org.springframework.web.portlet.HandlerMapping
to map from a request parameter to request handler beans.
The default name of the parameter is "action", but can be changed using
setParameterName() .
The bean configuration for this mapping will look somthing like this:
<bean id="parameterHandlerMapping" class="org.springframework.web.portlet.handler.ParameterHandlerMapping">
<property name="parameterMap">
<map>
<entry key="add"><ref bean="addItemHandler"/></entry>
<entry key="edit"><ref bean="editItemHandler"/></entry>
<entry key="delete"><ref bean="deleteItemHandler"/></entry>
</map>
</property>
</bean>
Thanks to Rainer Schmitz for suggesting this mapping strategy!
| Field Summary |
|---|
| public static final String | DEFAULT_PARAMETER_NAME | Default request parameter name to use for mapping to handlers: "action". |
| Methods from org.springframework.web.portlet.handler.AbstractHandlerMapping: |
|---|
|
adaptInterceptor, extendInterceptors, getAdaptedInterceptors, getDefaultHandler, getHandler, getHandlerExecutionChain, getHandlerInternal, getOrder, initApplicationContext, initInterceptors, setApplyWebRequestInterceptorsToRenderPhaseOnly, setDefaultHandler, setInterceptors, setOrder |