|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.peasCore.servlets.NavigationContext<WEB_COMPONENT_REQUEST_CONTEXT>
WEB_COMPONENT_REQUEST_CONTEXT
- the type of the web component request context.public class NavigationContext<WEB_COMPONENT_REQUEST_CONTEXT extends WebComponentRequestContext>
This class permits to handle a context according to the user navigation.
The navigation context can be see as a stack ofNavigationContext.NavigationStep
elements. Each time a
new step is defined, it is pushed into the stack. If the step already exists from the stack,
then the navigation context is reset to this.
The creation of navigation steps must be defined manually in web controllers by the programmer.
For doing, it can use the following tools:
NavigationStep
: it permits
to define a navigation step identifier and optinally a context identifierWebComponentRequestContext.getNavigationContext()
: provides methods that permits
to the user to set manually a navigation step without defining navigation step annotationsRedirectToPreviousNavigationStep
: when defined the user is redirected to the
previous navigation step from the navigation stackRedirectToNavigationStep
: when defined the user is redirected to the
navigation step from the navigation stack that is identifier by RedirectToNavigationStep.value()
NavigationContext.NavigationStep
element with no label defined is ignored in
this generation treatment.
Nested Class Summary | |
---|---|
class |
NavigationContext.NavigationStep
Class that represents the data of a navigation step. |
Method Summary | ||
---|---|---|
void |
addListener(NavigationContextListener listener)
Adds a listener to trigger. |
|
NavigationContext.NavigationStep |
clear()
Clears the navigation context and reset it to the base one. |
|
static
|
get(WEB_COMPONENT_REQUEST_CONTEXT context)
Sets the navigation context to the specified context associated to the current web controller. |
|
NavigationContext.NavigationStep |
getBaseNavigationStep()
Gets the first step of the navigation. |
|
NavigationContext.NavigationStep |
getCurrentNavigationStep()
Gets the current step of the navigation. |
|
NavigationContext.NavigationStep |
getPreviousNavigationStep()
Gets in any cases of navigation the right previous NavigationContext.NavigationStep
instance. |
|
WEB_COMPONENT_REQUEST_CONTEXT |
getWebComponentRequestContext()
Gets the context of the request associated to the current web component controller. |
|
NavigationContext.NavigationStep |
navigationStepFrom(String stepIdentifier)
Method to specify a navigation step creation/reset on a HTTP method of a WebComponentController without using the
NavigationStep annotation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <WEB_COMPONENT_REQUEST_CONTEXT extends WebComponentRequestContext> NavigationContext<WEB_COMPONENT_REQUEST_CONTEXT> get(WEB_COMPONENT_REQUEST_CONTEXT context)
context
- the context into which the navigation context must be set.public void addListener(NavigationContextListener listener)
listener
- a listener.public WEB_COMPONENT_REQUEST_CONTEXT getWebComponentRequestContext()
public NavigationContext.NavigationStep getPreviousNavigationStep()
NavigationContext.NavigationStep
instance.
If user has just performed a web treatment that resulting to a navigation step creation or
reset, then the returned navigation step is the previous of the one created or reset.
If user has performed a web treatment that not resulting to a navigation step creation or
reset, then the previous navigation step returned is the last created or reset.
NavigationContext.NavigationStep
as above described.public NavigationContext.NavigationStep getCurrentNavigationStep()
public NavigationContext.NavigationStep getBaseNavigationStep()
public NavigationContext.NavigationStep navigationStepFrom(String stepIdentifier)
WebComponentController
without using the
NavigationStep
annotation.
When a HTTP method with this annotation is called, one of the following internal treatment is
performed:
NavigationContext.NavigationStep.withFullUri(String)
: the current requested path
URI (with URL parameters) is setNavigationContextListener
necessary methods are triggered
stepIdentifier
- the identifier of a navigation step.
NavigationContext.NavigationStep
instance related to the specified identifier.public NavigationContext.NavigationStep clear()
getBaseNavigationStep()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |