Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

There is one instance of IRequestCodingStrategy per IRequestCycleProcessor. It is usually WebRequestCodingStrategy which is lazily created during the first request. Its creation can be customized by overriding AbstractRequestCycleProcessor#newRequestCodingStrategy().
See also Request coding strategy page.

Anchor
IRequestTarget
IRequestTarget

IRequestTarget is responsible for calling event handling code (for example onSubmit() method) and asking pages and components to render. IRequestTarget is created by IRequestCycleProcessor on every request. Which subclass of IRequestTarget will be created depends on RequestParameters instance which is decoded from requested URL. For example if a bookmarkable page is requested BookmarkablePageRequestTarget will be created, if a link is pressed ListenerInterfaceRequestTarget will be created.
You can get current request target by calling RequestCycle#getRequestTarget().
See also Request targets page.

On the whole request processing looks roughly like this. Here RequestCycle gets the request() message from WicketFilter/Servlet. The main idea behind the diagram is that requested URL is transformed into RequestParameters and then using it IRequestCycleProcessor creates IRequestTarget object and delegates to it event processing and rendering. Note that event processing happens before rendering. That is why if a page is changed in event handling code, those changes are visible in the rendering phase.

Anchor
diagram
diagram

Panel
bgColor#FFFFFF
title
borderStyledashed