Package org.apache.commons.jxpath.servlet

# Class PageScopeContext

java.lang.Object
org.apache.commons.jxpath.servlet.PageScopeContext

public class PageScopeContext extends Object
A lightweight wrapper for `PageContext` that restricts access to attributes of the "page" scope. This object is needed so that XPath "foo" would lookup the attribute "foo" in all scopes, while "$page/foo" would only look in the "page" scope.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PageScopeContext(PageContext pageContext)`
  Constructs a new PageScopeContext.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getAttribute(String attribute)`
  Gets the value of the specified attribute.
  `Enumeration<String>`
  `getAttributeNames()`
  Returns attributes of the pageContext declared in the "page" scope.
  `void`
  `setAttribute(String attribute, Object value)`
  Sets the specified attribute.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PageScopeContext

    public PageScopeContext(PageContext pageContext)
    Constructs a new PageScopeContext.
    Parameters:
      `pageContext` - base

- ## Method Details

  - ### getAttribute

    public Object getAttribute(String attribute)
    Gets the value of the specified attribute.
    Parameters:
      `attribute` - name
    Returns:
      Object

  - ### getAttributeNames

    public Enumeration<String> getAttributeNames()
    Returns attributes of the pageContext declared in the "page" scope.
    Returns:
      Enumeration of attribute names

  - ### setAttribute

    public void setAttribute(String attribute, Object value)
    Sets the specified attribute.
    Parameters:
      `attribute` - to set
      `value` - to set