PagePresentationContext Class
- public class PagePresentationContext
extends WindowPresentationContext
This class represents a portal page component. All presentation-related attributes of a page component
are available from instances of this class. Such instances are typically used during portal rendering via
look and feel skeleton files (e.g. page.jsp).
Related Topics
PagePresentationContext.getPagePresentationContext(HttpServletRequest)
-
Hierarchy
-
Object
ControlContext
PresentationContext
WindowPresentationContext
PagePresentationContext
-
All Implemented Interfaces
-
Serializable
-
Direct Known Subclasses
-
BookPresentationContext
public String |
-
getActiveImage ()
- Returns the webapp-qualified path to a fully skinned, classified, localized, and themed image to be displayed
when this page is active.
|
public BookPresentationContext |
-
getBookPresentationContextRecursive (String definitionLabel)
- Returns a book, searching the entire tree recursively.
|
public String |
-
getInactiveImage ()
- Returns the webapp-qualified path to a fully skinned, classified, localized, and themed image to be displayed
when this page is inactive.
|
public String |
-
getLabel ()
- Return the label for this page.
|
public static PagePresentationContext |
-
getPagePresentationContext (HttpServletRequest request)
- This is a convenience method for returning a reference to the current
PagePresentationContext .
|
public PagePresentationContext |
-
getPagePresentationContextRecursive (String definitionLabel)
- Returns a book or a page but traverse the entire tree; this will go inside books that are on pages too.
|
public PortletPresentationContext |
-
getPortletPresentationContextRecursive (String instanceLabel)
- Returns the
PortletPresentationContext matching the supplied instance label.
|
public PortletPresentationContext [] |
-
getPortletsPresentationContextRecursive (String definitionLabel)
- Returns an array of
PortletPresentationContext s matching the supplied definition label.
|
public String |
-
getRolloverImage ()
- Returns the webapp-qualified path to a fully skinned, classified, localized, and themed image to be displayed
when this page is inactive.
|
public List |
-
getWindowPresentationContexts ()
- Return the collection of child WindowPresentationContexts (
BookPresentationContext
or PortletPresentationContext ) for this page.
|
public boolean |
-
isActive ()
- Return true if this page is active.
|
public boolean |
-
isDisplayed ()
- Return true if this page is being displayed.
|
public boolean |
-
isHidden ()
- A hidden page is a page that does not show up as a tab in a book's menu.
|
public boolean |
-
isVisible ()
- Returns true if this page is visible.
|
Methods from com.bea.netuix.servlets.controls.window.WindowPresentationContext |
getCapability , getContentPresentationClass , getContentPresentationContextChildren , getContentPresentationStyle , getDefinitionId , getDefinitionLabel , getInstanceId , getOrientation , getParentPagePresentationContext , getPreviousWindowMode , getThemePresentationContext , getTitle , getTitlebarPresentationContext , getWindowMode , getWindowPresentationContext , getWindowState , isCapable , isPacked
|
Methods from com.bea.netuix.servlets.controls.PresentationContext |
getChildren , getChildren , getFirstChild , getParsedProperties , getPresentationClass , getPresentationId , getPresentationStyle , getProperties , getProperty , getProperty , getPropertyAsBoolean , getPropertyAsInt , getResolvedLocale , getTagName , setVisible
|
Methods from com.bea.netuix.servlets.controls.ControlContext |
getContextFromRequest, getControl, getRequestKey, getUniqueId, removeContextFromRequest, setContextInRequest |
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_NAME
protected static final String
CLASS_NAME
getActiveImage() Method
public String
getActiveImage()
Returns the webapp-qualified path to a fully skinned, classified, localized, and themed image to be displayed
when this page is active. Such an image may be optionally displayed in the page tab of it's parent book's
menu. This setting is optional, so this method may return null.
Returns
- The path to the active image for this page; null if not set
getBookPresentationContextRecursive(String) Method
public BookPresentationContext
getBookPresentationContextRecursive(String
definitionLabel)
Returns a book, searching the entire tree recursively.
If you are interested in both books AND pages use PagePresentationContext.getPagePresentationContextRecursive(String)
as that method returns both.
Parameters
-
definitionLabel
- The definitionLabel of the desired book
Returns
- The Book of interest or null if not found.
getInactiveImage() Method
public String
getInactiveImage()
Returns the webapp-qualified path to a fully skinned, classified, localized, and themed image to be displayed
when this page is inactive. Such an image may be optionally displayed in the page tab of it's parent book's
menu. This setting is optional, so this method may return null.
Returns
- The path to the active image for this page; null if not set
getLabel() Method
public String
getLabel()
Return the label for this page. This is equivalent to calling PagePresentationContext.getDefinitionLabel()
.
-
Overrides
-
WindowPresentationContext.getLabel()
Returns
- The page's label
getPagePresentationContext(HttpServletRequest) Method
public static PagePresentationContext
getPagePresentationContext(HttpServletRequest
request)
This is a convenience method for returning a reference to the current PagePresentationContext
.
Note this method will only work if called from within a portal (typically, from the page.jsp skeleton).
This method may return null if called when no appropriate context exists, but such a context should safely
exist when being fetched from the associated skeleton JSP during normal portal rendering.
Parameters
-
request
- The current HTTPServletRequest instance
Returns
- A reference to the current PagePresentationContext, if any
getPagePresentationContextRecursive(String) Method
public PagePresentationContext
getPagePresentationContextRecursive(String
definitionLabel)
Returns a book or a page but traverse the entire tree; this will go inside books that are on pages too.
Parameters
-
definitionLabel
- The definitionLabel of the desired page
Returns
- PagePresentationContext (or BookPresentationContext if a book) of the page or book with a matching
definition label
getPortletPresentationContextRecursive(String) Method
public PortletPresentationContext
getPortletPresentationContextRecursive(String
instanceLabel)
Returns the PortletPresentationContext
matching the supplied instance label.
Parameters
-
instanceLabel
- The Unique instance label of the desired portlet
Returns
- A reference to the PortletPresentationContext if it exists; null otherwise
getPortletsPresentationContextRecursive(String) Method
public PortletPresentationContext
[] getPortletsPresentationContextRecursive(String
definitionLabel)
Returns an array of PortletPresentationContext
s matching the supplied definition label.
Since many portlets can share the same definition label, more then one portlet
can be returned. If you are interested in just one portlet then try
PagePresentationContext.getPortletPresentationContextRecursive(String)
.
Parameters
-
definitionLabel
- The label of the portlet(s)
Returns
- A non-null array of PortletPresentationContexts
getRolloverImage() Method
public String
getRolloverImage()
Returns the webapp-qualified path to a fully skinned, classified, localized, and themed image to be displayed
when this page is inactive. Such an image may be optionally displayed in the page tab of it's parent book's
menu. This setting is optional, so this method may return null.
Returns
- The path to the active image for this page; null if not set
getWindowPresentationContexts() Method
public List
getWindowPresentationContexts()
Return the collection of child WindowPresentationContexts (BookPresentationContext
or PortletPresentationContext
) for this page.
If no child portlets and books exist, this returns an empty list.
Returns
- A list of BookPresentationContext and PortletPresentationContexts objects
isActive() Method
public boolean isActive()
Return true if this page is active. Note this is different from PagePresentationContext.isDisplayed()
in that an active page is not necessarily always displayed, since the parent book may not itself be active.
Active pages can have an inactive parent book but when the parent is activated again the
current page is remembered.
Returns
- True, if the page is active.
isDisplayed() Method
public boolean isDisplayed()
Return true if this page is being displayed. Note that this is different from PagePresentationContext.isActive()
in that an active page is not necessarily always displayed, since the parent book may not be active.
Returns
- True, if the page is displayed
isHidden() Method
public boolean isHidden()
A hidden page is a page that does not show up as a tab in a book's menu. It may
still be activated via links and events, however.
Returns
- True, if this is a hidden page
isVisible() Method
public boolean isVisible()
Returns true if this page is visible. Note that this is different from PagePresentationContext.isDisplayed()
and PagePresentationContext.isActive()
.
Generaly this method is useless as the pages that are not being displayed are suspended
and
never get visible set to false. It is recommended that you use PagePresentationContext.isDisplayed()
or PagePresentationContext.isActive()
instead.
-
Overrides
-
PresentationContext.isVisible()
Returns
- True if the page is visible