|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface StateManager
Manages state of JSPs.
Example: the user displays customerdetail.jsp for customer A, then productdetail.jsp for product B, and then again customerdetail.jsp for customer C. What should happen to A and B at this point? There are two possible strategies: stack and page. PageStateStrategy preserves the latest state for every page. In the example A will be destroyed and B and C will be preserved. So the user can display the productdetails.jsp with B and the customerdetail.jsp with C using browser history buttons. StackStateStrategy puts the pages into a stack. In the example, first customerdetail.jsp/A is pushed, then productdetail.jsp/B is pushed. In the last step, productdetail.jsp is popped because there is already a customerdetail.jsp on the stack. After productdetail.jsp is popped, the associated value of customerdetail.jsp is changed from A to C. The stack will only contain the value C for customerdetail.jsp, the values A and B will be destroyed.
| Nested Class Summary | |
|---|---|
static interface |
StateManager.State
lifecycle: initialize() -> show() -> hide() -> ... -> show() -> hide() -> destroy() |
| Method Summary | |
|---|---|
void |
destroyAll()
removes all states |
void |
destroyByName(java.lang.String name)
removes + destroys a named state |
StateLogger |
getLogger()
|
void |
initializeAndShow(StateManager.State s)
makes s the current state. |
void |
setLogger(StateLogger logger)
logger for debug/test |
void |
showByName(java.lang.String name)
makes a state with name the current state. |
| Method Detail |
|---|
void initializeAndShow(StateManager.State s)
throws java.lang.Exception
s,
it will be destroyed and replaced by s.
java.lang.Exception
void showByName(java.lang.String name)
throws java.lang.Exception
name the current state.
java.lang.Exception
void destroyAll()
throws java.lang.Exception
java.lang.Exception
void destroyByName(java.lang.String name)
throws java.lang.Exception
java.lang.Exceptionvoid setLogger(StateLogger logger)
StateLogger getLogger()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||