|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
org.springframework.web.servlet.view.xml.MarshallingView
public class MarshallingView
Spring-MVC View
that allows for response context to be rendered as the result of marshalling by a Marshaller
.
The Object to be marshalled is supplied as a parameter in the model and then detected during response rendering. Users can either specify a specific entry in the
model via the sourceKey
property or have Spring locate the Source object.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_CONTENT_TYPE
Default content type. |
private Marshaller |
marshaller
|
private java.lang.String |
modelKey
|
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
---|
logger |
Fields inherited from interface org.springframework.web.servlet.View |
---|
RESPONSE_STATUS_ATTRIBUTE |
Constructor Summary | |
---|---|
MarshallingView()
Constructs a new MarshallingView with no Marshaller set. |
|
MarshallingView(Marshaller marshaller)
Constructs a new MarshallingView with the given Marshaller set. |
Method Summary | |
---|---|
protected void |
initApplicationContext()
Subclasses can override this for custom initialization behavior. |
protected java.lang.Object |
locateToBeMarshalled(java.util.Map model)
Locates the object to be marshalled. |
protected void |
renderMergedOutputModel(java.util.Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Subclasses must implement this method to actually render the view. |
void |
setMarshaller(Marshaller marshaller)
Sets the Marshaller to be used by this view. |
void |
setModelKey(java.lang.String modelKey)
Set the name of the model key that represents the object to be marshalled. |
Methods inherited from class org.springframework.web.servlet.view.AbstractView | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
addStaticAttribute,
|