org.springframework.web.servlet.view
Class AbstractUrlBasedView

java.lang.Object
  extended byorg.springframework.context.support.ApplicationObjectSupport
      extended byorg.springframework.web.context.support.WebApplicationObjectSupport
          extended byorg.springframework.web.servlet.view.AbstractView
              extended byorg.springframework.web.servlet.view.AbstractUrlBasedView
All Implemented Interfaces:
ApplicationContextAware, BeanNameAware, View
Direct Known Subclasses:
AbstractJasperReportsView, AbstractTemplateView, InternalResourceView, RedirectView

public abstract class AbstractUrlBasedView
extends AbstractView

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.

Since:
13.12.2003
Author:
Juergen Hoeller

Field Summary
 
Fields inherited from class org.springframework.web.servlet.view.AbstractView
DEFAULT_CONTENT_TYPE
 
Fields inherited from class org.springframework.context.support.ApplicationObjectSupport
logger
 
Constructor Summary
AbstractUrlBasedView()
           
 
Method Summary
 String getUrl()
          Return the URL of the resource that this view wraps.
protected  void initApplicationContext()
          Overridden lifecycle method to check that 'url' property is set.
 void setUrl(String url)
          Set the URL of the resource that this view wraps.
 String toString()
           
 
Methods inherited from class org.springframework.web.servlet.view.AbstractView
addStaticAttribute, createRequestContext, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getStaticAttributes, render, renderMergedOutputModel, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setRequestContextAttribute
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractUrlBasedView

public AbstractUrlBasedView()
Method Detail

setUrl

public void setUrl(String url)
Set the URL of the resource that this view wraps. The URL must be appropriate for the concrete View implementation.


getUrl

public String getUrl()
Return the URL of the resource that this view wraps.


initApplicationContext

protected void initApplicationContext()
Overridden lifecycle method to check that 'url' property is set.

Overrides:
initApplicationContext in class ApplicationObjectSupport
See Also:
ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext)

toString

public String toString()
Overrides:
toString in class AbstractView


Copyright (C) 2003-2004 The Spring Framework Project.