THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Most web applications will need to have some data that is shared across multiple pages. Perhaps you are creating a multi-page wizard, or you have an object that tracks the user's identify once logged in, or maybe you need to manage a shopping cart.
Wiki Markup |
---|
{float:right|background=#eee}
{contentbylabel:title=Related Articles|showLabels=false|showSpace=false|space=@self|labels=persistence}
{float} |
Ordinary page-persistent fields won't work for this, since persistent fields are available only to a specific page, not shared across multiple pages.
...
A field holding an SSO is marked with the @SessionState annotation.
Wiki Markup |
---|
{float:right|} {panel:background=#eee|title=Contents} {contentbylabeltoc:titleminLevel=Related Articles2|showLabels=false|showSpace=false|space=@self|labels=persistencemaxLevel=4} {panel} {float} |
Example:
Code Block | ||||
---|---|---|---|---|
| ||||
public class MyPage { @SessionState private ShoppingCart shoppingCart; . . . } |
...