net.databinder
Class DataApplicationBase

java.lang.Object
  extended by org.apache.wicket.Application
      extended by org.apache.wicket.protocol.http.WebApplication
          extended by net.databinder.DataApplicationBase
Direct Known Subclasses:
DataApplication, DataApplication, DataApplication

public abstract class DataApplicationBase
extends org.apache.wicket.protocol.http.WebApplication

Common functionality for Databinder applications.


Field Summary
 
Fields inherited from class org.apache.wicket.Application
CONFIGURATION, CONTEXTPATH, DEPLOYMENT, DEVELOPMENT
 
Constructor Summary
DataApplicationBase()
           
 
Method Summary
protected abstract  void dataInit()
          Databinder initialization, client applications should not normally override.
protected  void internalInit()
          Internal initialization.
 boolean isCookielessSupported()
           
protected  boolean isDevelopment()
          Reports if the program is running in a development environment, as determined by the "wicket.configuration" environment variable or context/init parameter.
protected  org.apache.wicket.IConverterLocator newConverterLocator()
          Adds converters to Wicket's base locator.
 org.apache.wicket.RequestCycle newRequestCycle(org.apache.wicket.Request request, org.apache.wicket.Response response)
           
protected  org.apache.wicket.protocol.http.WebResponse newWebResponse(javax.servlet.http.HttpServletResponse servletResponse)
          If isCookielessSupported() returns false, this method returns a custom WebResponse that disables URL rewriting.
protected  void setCookielessSupported(boolean cookielessSupported)
          Set to false to disable URL rewriting and consequentally hamper cookieless browsing.
 
Methods inherited from class org.apache.wicket.protocol.http.WebApplication
getApplicationKey, getConfigurationType, getDefaultRequestCycleFactory, getInitParameter, getRequestCycleProcessor, getResourceFinder, getServletContext, getSessionAttributePrefix, getWicketFilter, init, internalDestroy, logEventTarget, logResponseTarget, mount, mount, mountBookmarkablePage, mountBookmarkablePage, mountSharedResource, newAjaxRequestTarget, newRequestCycleProcessor, newSession, newSession, newSession, newSessionStore, newWebRequest, outputDevelopmentModeWarning, sessionDestroyed, setApplicationKey, setWicketFilter, unmount
 
Methods inherited from class org.apache.wicket.Application
addComponentInstantiationListener, addComponentOnAfterRenderListener, addComponentOnBeforeRenderListener, addRenderHeadListener, configure, destroy, exists, get, get, getApplicationKeys, getApplicationSettings, getConverterLocator, getDebugSettings, getExceptionSettings, getFrameworkSettings, getHomePage, getMarkupCache, getMarkupSettings, getMetaData, getName, getPageSettings, getRequestCycleFactory, getRequestCycleSettings, getRequestLogger, getRequestLoggerSettings, getResourceSettings, getSecuritySettings, getSessionFactory, getSessionSettings, getSessionStore, getSharedResources, initializeComponents, newRequestCycle, newRequestLogger, notifyRenderHeadListener, onDestroy, removeComponentInstantiationListener, removeComponentOnAfterRenderListener, removeComponentOnBeforeRenderListener, removeRenderHeadListener, set, setMetaData, unset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataApplicationBase

public DataApplicationBase()
Method Detail

internalInit

protected void internalInit()
Internal initialization. Client applications should not normally override or call this method.

Overrides:
internalInit in class org.apache.wicket.protocol.http.WebApplication

dataInit

protected abstract void dataInit()
Databinder initialization, client applications should not normally override.


newConverterLocator

protected org.apache.wicket.IConverterLocator newConverterLocator()
Adds converters to Wicket's base locator.

Overrides:
newConverterLocator in class org.apache.wicket.Application

newWebResponse

protected org.apache.wicket.protocol.http.WebResponse newWebResponse(javax.servlet.http.HttpServletResponse servletResponse)
If isCookielessSupported() returns false, this method returns a custom WebResponse that disables URL rewriting.

Overrides:
newWebResponse in class org.apache.wicket.protocol.http.WebApplication

newRequestCycle

public org.apache.wicket.RequestCycle newRequestCycle(org.apache.wicket.Request request,
                                                      org.apache.wicket.Response response)
Overrides:
newRequestCycle in class org.apache.wicket.protocol.http.WebApplication

isCookielessSupported

public boolean isCookielessSupported()
Returns:
true if cookieless use is supported through URL rewriting.

setCookielessSupported

protected void setCookielessSupported(boolean cookielessSupported)
Set to false to disable URL rewriting and consequentally hamper cookieless browsing. Users with cookies disabled, and more importantly search engines, will still be able to browse the application through bookmarkable URLs. Because rewriting is disabled, these URLs will have no jsessionid appended and will remain static.

The Application's "page expired" error page will be set to PageExpiredCookieless if cookielessSupported is false, unless an alternate error page has already been specified. This page will appear when cookieless users try to follow a link or form-submit that requires a session, informing them that cookies are required.

Parameters:
cookielessSupported - true if cookieless use is supported through URL rewriting
See Also:
PageExpiredCookieless

isDevelopment

protected boolean isDevelopment()
Reports if the program is running in a development environment, as determined by the "wicket.configuration" environment variable or context/init parameter. If that variable is unset or set to "development", the app is considered to be running in development.

Returns:
true if running in a development environment


Copyright © 2005-2008 Nathan Hamblen. All Rights Reserved.