java.lang.Object | ||||
↳ | org.springframework.context.support.ApplicationObjectSupport | |||
↳ | org.springframework.web.portlet.handler.AbstractHandlerMapping | |||
↳ | org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping<K> | |||
↳ | org.springframework.web.portlet.handler.ParameterHandlerMapping |
Implementation of the 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!
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEFAULT_PARAMETER_NAME | Default request parameter name to use for mapping to handlers: "action". |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
org.springframework.core.Ordered
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.context.support.ApplicationObjectSupport
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calls the
registerHandlers method in addition
to the superclass's initialization. | |||||||||||
Set a Map with parameters as keys and handler beans or bean names as values.
| |||||||||||
Set the name of the parameter used for mapping to handlers.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Uses the value of the specified parameter as lookup key.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.web.portlet.handler.AbstractMapBasedHandlerMapping
| |||||||||||
From class
org.springframework.web.portlet.handler.AbstractHandlerMapping
| |||||||||||
From class
org.springframework.context.support.ApplicationObjectSupport
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.ApplicationContextAware
| |||||||||||
From interface
org.springframework.core.Ordered
| |||||||||||
From interface
org.springframework.web.portlet.HandlerMapping
|
Default request parameter name to use for mapping to handlers: "action".
Calls the registerHandlers
method in addition
to the superclass's initialization.
BeansException |
---|
Set a Map with parameters as keys and handler beans or bean names as values. Convenient for population with bean references.
parameterMap | map with parameters as keys and beans as values |
---|
Set the name of the parameter used for mapping to handlers.
Default is "action".
Uses the value of the specified parameter as lookup key.
request | current portlet request |
---|
null
)Exception |
---|