org.springframework.web.servlet.view
abstract public class: AbstractUrlBasedView [javadoc |
source]
java.lang.Object
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
org.springframework.web.servlet.view.AbstractUrlBasedView
All Implemented Interfaces:
InitializingBean, View, BeanNameAware, ServletContextAware, ApplicationContextAware
Direct Known Subclasses:
AbstractTemplateView, FreeMarkerView, TilesView, JasperReportsCsvView, JasperReportsXlsView, JasperReportsPdfView, TilesView, RedirectView, AbstractJasperReportsSingleFormatView, AbstractPdfStamperView, VelocityToolboxView, JasperReportsHtmlView, VelocityLayoutView, AbstractJasperReportsView, VelocityView, JstlView, ConfigurableJasperReportsView, XsltView, TilesJstlView, InternalResourceView, JasperReportsMultiFormatView
Abstract base class for URL-based views. Provides a consistent way of
holding the URL that a View wraps, in the form of a "url" bean property.
- author:
Juergen - Hoeller
- since:
13.12.2003 -
| Methods from org.springframework.web.servlet.view.AbstractView: |
|---|
|
addStaticAttribute, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, prepareResponse, render, renderMergedOutputModel, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute, toString, writeToResponse |
| Method from org.springframework.web.servlet.view.AbstractUrlBasedView Detail: |
public void afterPropertiesSet() throws Exception {
if (isUrlRequired() && getUrl() == null) {
throw new IllegalArgumentException("Property 'url' is required");
}
}
|
public String getUrl() {
return this.url;
}
Return the URL of the resource that this view wraps. |
protected boolean isUrlRequired() {
return true;
}
|
public void setUrl(String url) {
this.url = url;
}
Set the URL of the resource that this view wraps.
The URL must be appropriate for the concrete View implementation. |
public String toString() {
StringBuffer sb = new StringBuffer(super.toString());
sb.append("; URL [").append(getUrl()).append("]");
return sb.toString();
}
|