Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5
Class PageCallback

    java.lang.Object
      org.apache.tapestry5.PageCallback

All Implemented Interfaces:
  java.io.Serializable

    @ImmutableSessionPersistedObject
    public class PageCallback

extends java.lang.Object
implements java.io.Serializable

A way of capturing the name of a page and the page activation context so that, at a future date, the page can be invoked with that data. This kind of callback is very useful when creating more complicated workflows, where access to a page is "interrupted" with some operation before returning (via a callback) to the original flow.

Since the callback is serializable, it can be stored in the session.

Since:
  5.2.0
See Also:
  Serialized Form

Constructor Summary
`PageCallback(java.lang.String pageName)`
`PageCallback(java.lang.String pageName, EventContext activationContext)`
`PageCallback(java.lang.String pageName, java.lang.String[] activationContext)`

Method Summary
`protected java.lang.String` | `activationContextDescription()` Returns the activation context as a string of value separated by slashes.
`java.lang.String` | `getPageName()`
`protected boolean` | `hasActivationContext()` Does the activation context have any values? Used, typically, inside an override of `toString()`.
`Link` | `toLink(PageRenderLinkSource linkSource)` Converts the callback (the page name and activation context) to a link; such a link may be returned from a event handler method to cause Tapestry to redirect to the page.
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### PageCallback

    public PageCallback(java.lang.String pageName,
                        java.lang.String[] activationContext)

### PageCallback

    public PageCallback(java.lang.String pageName,
                        EventContext activationContext)

### PageCallback

    public PageCallback(java.lang.String pageName)

Method Detail

### getPageName

    public java.lang.String getPageName()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### hasActivationContext

    protected final boolean hasActivationContext()

  Does the activation context have any values? Used, typically, inside an override of `toString()`.

### activationContextDescription

    protected final java.lang.String activationContextDescription()

  Returns the activation context as a string of value separated by slashes. Typically used inside an override of `toString()`.

### toLink

    public Link toLink(PageRenderLinkSource linkSource)

  Converts the callback (the page name and activation context) to a link; such a link may be returned from a event handler method to cause Tapestry to redirect to the page. Most of the details are encapsulated inside the `PageRenderLinkSource` service.

  Parameters:
    `linkSource` - used to generate the link
  Returns:
    link corresponding to this callback

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.