|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentEventLinkEncoder
Responsible for creating Link
s for page render requests and for component event
requests, and for parsing incoming paths to identify requests that are component event or page render requests. This
centralizes some logic that was scattered about in Tapestry 5.0.
Method Summary | |
---|---|
Link |
createComponentEventLink(ComponentEventRequestParameters parameters,
boolean forForm)
Creates a link that encapsulates a component event request, including PersistentLocale (if set). |
Link |
createPageRenderLink(PageRenderRequestParameters parameters)
Creates a Link that encapsulates a page render request, including activation context and PersistentLocale (if set). |
ComponentEventRequestParameters |
decodeComponentEventRequest(Request request)
Checks the request, primarily the path, to determine the if the request is a component event request. |
PageRenderRequestParameters |
decodePageRenderRequest(Request request)
Checks the request, primarily the path, to determine the if the request is a page render request. |
Method Detail |
---|
Link createPageRenderLink(PageRenderRequestParameters parameters)
PersistentLocale
(if set).
Passes the resulting Link through the PageRenderLinkTransformer
chain of command, returning
the result.
parameters
- defining page to render and context
Link createComponentEventLink(ComponentEventRequestParameters parameters, boolean forForm)
PersistentLocale
(if set).
Forms:
The persistent locale may be placed in between the context name and the page name, i.e., "/context/fr/SomePage".
In many cases the context name is blank, so the path begins with a "/" and then the locale name or page name.
The page name portion may itself consist of a series of folder names, i.e., "admin/user/create". The context
portion isn't the concern of this code, since Request.getPath()
will
already have stripped that off. We can act as if the context is always "/" (the path always starts with a slash).
Passes the resulting Link through the ComponentEventLinkTransformer
chain of command, returning the
result.
parameters
- defining page, component, activation context and other detailsforForm
- true if the event link will trigger a form submission
ComponentEventRequestParameters decodeComponentEventRequest(Request request)
PersistentLocale
...
but only if the locale is a component event.
request
- incoming request
PageRenderRequestParameters decodePageRenderRequest(Request request)
PersistentLocale
... but
only if the request is a page render.
request
- incoming request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |