Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Layout tweaks

...

 

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
java
java
public class MyPage
{
  @SessionState
  private ShoppingCart shoppingCart;
  
  . . .
}

...