Class Application

All Implemented Interfaces:
IEventSink, IMetadataContext<Object,Application>, ISessionStore.UnboundListener
Direct Known Subclasses:

Base class for all Wicket applications. To create a Wicket application, you generally should not directly subclass this class. Instead, you will want to subclass some subclass of Application, like WebApplication, which is appropriate for the protocol and markup type you are working with.

Application has the following interesting features / attributes:

  • Name - The Application's name, which is the same as its class name.
  • Home Page - The Application's home Page class. Subclasses must override getHomePage() to provide this property value.
  • Settings - Application settings are partitioned into sets of related settings using interfaces in the org.apache.wicket.settings package. These interfaces are returned by the following methods, which should be used to configure framework settings for your application: getApplicationSettings(), getDebugSettings(), getExceptionSettings(), getMarkupSettings(), getPageSettings(), getRequestCycleSettings(), getSecuritySettings and getSessionSettings(). These settings are configured by default through the constructor or internalInit methods. Default the application is configured for DEVELOPMENT. You can configure this globally to DEPLOYMENT or override specific settings by implementing the init() method.
  • Shared Resources - Resources added to an Application's SharedResources have application-wide scope and can be referenced using a logical scope and a name with the ResourceReference class. ResourceReferences can then be used by multiple components in the same application without additional overhead (beyond the ResourceReference instance held by each referee) and will yield a stable URL, permitting efficient browser caching of the resource (even if the resource is dynamically generated). Resources shared in this manner may also be localized. See ResourceReference for more details.
  • Custom Session Subclasses- In order to install your own Session subclass you must override ApplicationnewSession(Request, Response). For subclasses of WebApplication you will want to subclass WebSession.
Jonathan Locke
See Also: