spring-framework / org.springframework.web.servlet.view.xml / MarshallingView

MarshallingView

open class MarshallingView : AbstractView

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.

Author
Arjen Poutsma

Author
Juergen Hoeller

Since
3.0

Constructors

<init>

MarshallingView()

Construct a new MarshallingView with no Marshaller set. The marshaller must be set after construction by invoking #setMarshaller.

MarshallingView(marshaller: Marshaller)

Constructs a new MarshallingView with the given Marshaller set.

Properties

DEFAULT_CONTENT_TYPE

static val DEFAULT_CONTENT_TYPE: String

Default content type. Overridable as bean property.

Functions

setMarshaller

open fun setMarshaller(marshaller: Marshaller): Unit

Set the Marshaller to be used by this view.

setModelKey

open fun setModelKey(modelKey: String): Unit

Set the name of the model key that represents the object to be marshalled. If not specified, the model map will be searched for a supported value type.