Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: included IPageSource

...

org.apache.wicket.request.handler.IPageProvider's task is to return a page instance by page id or page class.
Default implementation provided by Wicket is org.apache.wicket.request.handler.PageProvider, which delegates page creation and retrieval to a IPageSource.

IPageSource

Default implementation of org.apache.wicket.request.mapper.IPageSource is org.apache.wicket.DefaultMapperContext.
When page class is provided then DefaultMapperContext delegates to IPageFactory. When page id is provided PageProvider it will delegate the work to IPageManager to find the page.
When page class is provided then the work is delegated to IPageFactory

IPageFactory

org.apache.wicket.IPageFactory creates pages.

IPageManager

org.apache.wicket.page.IPageManager's task is to manage which pages have been used in a request and store their last state in the backing stores, namely IPageStore.
The default implementation org.apache.wicket.page.PageStoreManager collects all stateful pages which have been used in the request cycle (more than one page can be used in a single request if for example setResponsePage() or RestartResponseException is used).
At the end of the request all collected page instances are being stored in the first level cache - http session. They are stored in http session attribute named "wicket:persistentPageManagerData-APPLICATION_NAME" and passed to the underlying IPageStore.
When the next http request comes IPageProvider will ask for page with specific id and StorePageManager will look first in the http session and if no match is found then it will delegate to the IPageStore. At the end of the second request the http session based cache is being overwritten completely with the newly used page instances.

...