|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.RequestCycle org.apache.wicket.protocol.http.WebRequestCycle
public class WebRequestCycle
RequestCycle implementation for HTTP protocol. Holds the application, session, request and response objects for a given HTTP request. Contains methods (urlFor*) which yield a URL for bookmarkable pages as well as non-bookmarkable component interfaces. The protected handleRender method is the internal entrypoint which takes care of the details of rendering a response to an HTTP request.
RequestCycle
Field Summary |
---|
Fields inherited from class org.apache.wicket.RequestCycle |
---|
application, processor, request, response |
Constructor Summary | |
---|---|
WebRequestCycle(WebApplication application,
WebRequest request,
Response response)
Constructor which simply passes arguments to superclass for storage there. |
Method Summary | |
---|---|
IRequestCycleProcessor |
getProcessor()
By default returns the WebApplication's default request cycle processor. |
WebRequest |
getWebRequest()
Casts Request to a WebRequest
WARNING: Do not override this method. |
WebResponse |
getWebResponse()
Casts Response to a WebResponse
WARNING: Do not override this method. |
WebSession |
getWebSession()
Casts Session to a WebSession
WARNING: Do not override this method. |
boolean |
isRedirect()
If it's an ajax request we always redirect. |
protected WebPage |
newBrowserInfoPage(String url)
Override this method if you want to use a custom page for gathering the client's browser information. The easiest way is just to extend BrowserInfoPage and provide your own markup file |
protected ClientInfo |
newClientInfo()
Creates a new agent info object based on this request. |
protected void |
onExceptionLoop(RuntimeException e)
Called when we catch a RuntimeException while already handling another |
void |
redirectTo(Page page)
Redirects browser to the given page. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WebRequestCycle(WebApplication application, WebRequest request, Response response)
application
- The applicationrequest
- The requestresponse
- The responseMethod Detail |
---|
public IRequestCycleProcessor getProcessor()
WebApplication.newRequestCycleProcessor()
.
if you decide to override this method to provide a custom processor per request
cycle, any mounts done via WebApplication will not work and and
RequestCycle.onRuntimeException(Page, RuntimeException)
is not called unless you deliberately put
effort in it to make it work.
getProcessor
in class RequestCycle
RequestCycle.getProcessor()
protected void onExceptionLoop(RuntimeException e)
RequestCycle
RuntimeException
while already handling another
onExceptionLoop
in class RequestCycle
public WebRequest getWebRequest()
Request
to a WebRequest
WARNING: Do not override this method. Use RequestCycle.setRequest(Request)
if request
substitution is needed, or override RequestCycle.getRequest()
.
public WebResponse getWebResponse()
Response
to a WebResponse
WARNING: Do not override this method. Use RequestCycle.setResponse(Response)
if response
substitution is needed, or override RequestCycle.getResponse()
.
public WebSession getWebSession()
Session
to a WebSession
WARNING: Do not override this method.
public final void redirectTo(Page page)
redirectTo
in class RequestCycle
page
- The page to redirect toprotected ClientInfo newClientInfo()
RequestCycle.newClientInfo()
might be relatively expensive.
To gather the client information this implementation redirects temporarily to a special page
(BrowserInfoPage
).
Note: Do not call this method from your custom Session
constructor
because the temporary page needs a constructed Session
to be able to work.
If you need to set a default client info property then better use
Session.setClientInfo(org.apache.wicket.request.ClientInfo)
directly.
newClientInfo
in class RequestCycle
protected WebPage newBrowserInfoPage(String url)
BrowserInfoPage
and provide your own markup file
url
- the url to redirect to when the browser info is handled
WebPage
which should be used while gathering browser infopublic final boolean isRedirect()
isRedirect
in class RequestCycle
RequestCycle.isRedirect()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |