Module org.apache.wicket.core
Package org.apache.wicket
package org.apache.wicket
The core Wicket package. The key core classes you will need to learn to do basic Wicket programming are:
Application
/WebApplication
- Subclass WebApplication to create your application. Set your home page with Application.getPages().setHomePage(MyHomePage.class). Configure Wicket for deployment with Application.getSettings().configure("deployment"). Substitute "development" to get default settings for a development environment.Component
- You will need to carefully study this class as Component is very central to Wicket. There are a large number of convenience methods in Component and, naturally, every component in Wicket is a subclass of Component, so all these methods are available to all Components.IRequestCycleListener
- If you are working with a persistence framework such as Hibernate or JDO, you may need to implement a request cycle listener in order to open a persistence session at the beginning of a request and close the session at the end of the request.MarkupContainer
- You will need to study MarkupContainer carefully as this class contains all the logic for creating and maintaining component hierarchies.Page
/WebPage
- Every page in your wicket application will extend WebPage (or some other subclass of Page if you are writing something other than a web application). There are a number of important methods in Page and you should be familiar with all of them.PageParameters
- A simple wrapper for query string parameters.Session
/WebSession
- It is particularly important to understand Session if you are doing clustering, but even for a very basic application you will want to create your own subclass of WebSession using a session factory so that you can store any session properties in a typesafe way. Note that since Pages are first class objects with models of their own, it is likely or at least possible that you will not have many session properties.
-
ClassDescriptionBase class for all Wicket applications.This class allows a tag attribute of a component to be modified dynamically with a value obtained from a model object.Special attribute value markers.An AttributeModifier specialized in managing the CSS class attributeComponent serves as the highest level abstract base class for all components.Implementation of
IConverterLocator
interface, which locates converters for a given type.If an exception is thrown when a page is being rendered this mapper will decide which error page to show depending on the exception type andapplication configuration
Wicket's default implementation for the mapper contextAn implementation of IMarkupIdGenerator that uses the Session to generate sequence numbers for the component markup ids.A provider of aPageManager
managing @link IManageablePage}s with a default chain ofIPageStore
s:RequestPageStore
keeping pages until end of the requestCachingPageStore
caching with an ...InSessionPageStore
keeping the last accessed page in the sessionSerializingPageStore
serializing all pages (so they are available for back-button)AsynchronousPageStore
moving storage of pages to an asynchronous worker thread (enabled by default withStoreSettings.isAsynchronous()
)CryptingPageStore
encrypting all pages (disabled by default inStoreSettings.isEncrypted()
)DiskPageStore
persisting all pages, configured according toStoreSettings
An alternative chain with all pages held in-memory could be:RequestPageStore
keeping pages until end of the requestCachingPageStore
caching with an ...InSessionPageStore
keeping the last accessed page in the sessionSerializingPageStore
serializing all pages (so they are available for back-button)AsynchronousPageStore
moving storage of pages to a worker threadInMemoryPageStore
keeping all pages in memory ... or if all pages should be kept in the session only, without any serialization (no back-button support though):RequestPageStore
caching pages until end of the requestInSessionPageStore
keeping a limited count of pages in the session, e.g. 10 The chain's initial store should always be aRequestPageStore
, buffering all adding of pages until the end of the request.Context for component dequeueing.A bookmark for the DequeueContext stackApplication
lifecycle listenerAllows applications to intercept behavior instantiationA specialization ofIEventSink
that adds component as an additional parameter to theIComponentAwareEventSink.onEvent(Component, IEvent)
method.Locates the proper converter instance for a given type.Listens toComponent.detach()
calls.Delivers an event to a component.IGenericComponent<T,C extends IGenericComponent<? super T, ?>> An interface for allcomponents
with type-safe accessors and mutators for the model and its object.Initializes something when application loads.Generates markup ids for componentsIMetadataContext<B,R extends IMetadataContext<B, R>> Used to unify all metadata methods across the various objects.Initializer for components in wicket core library.A factory class that creates Pages.Provider of anIPageManager
.Interface for Function<RenderPageRequestHandler, PageRenderer>Demarcates components that act as a root can dequeue children.Provides instances ofRequestCycle
objectsA factory which creates resources for a given specification string.Session
listenerA marker interface for exceptions which are recommended to be handled by the frameworkA utility class that encapsulates all of the localization related functionality in a way that it can be accessed by all areas of the framework in a consistent way.A MarkupContainer holds a map of child components.Class used for holding meta data entries.MetaDataKey<T>Causes Wicket to interrupt current request processing and immediately respond with the specified page.Abstract base class for pages.Unique identifier of a page instanceContains all resource bundles that are registered in the application.Causes Wicket to interrupt current request processing and immediately redirect to an intercept page.Causes Wicket to interrupt current request processing and immediately respond with the specified page.Holds information about a user session, including some fixed number of most recent pages (and all their nested component information).Class which holds shared resources.An AttributeModifier specialized in managing the CSS style attributeMapper that encapsulates mappers that are necessary for Wicket to function.SystemMapper.HomePageProvider<C extends Page>Holds thread local state for Wicket data.A request mapper that is used to create Url out of UrlResourceReference.Generic runtime exception subclass thrown by Wicket.