Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2008 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.servlets.controls.application
Class DesktopPresentationContext

    java.lang.Object
      com.bea.netuix.servlets.controls.ControlContext
          com.bea.netuix.servlets.controls.PresentationContext
              com.bea.netuix.servlets.controls.application.DesktopPresentationContext

All Implemented Interfaces
  Serializable

    public class DesktopPresentationContext

extends PresentationContext

This class represents a portal desktop component. All presentation-related attributes of a desktop component are available from instances of this class. Such instances are typically used during portal rendering via look and feel skeleton files (e.g. desktop.jsp).

See Also
  `getDesktopPresentationContext(javax.servlet.http.HttpServletRequest)`, Serialized Form

Field Summary
`protected static String` | `CLASS_NAME`

Method Summary
`BookPresentationContext` | `getBookPresentationContext()` Retrieve the main book (top level) presentation context.
`BookPresentationContext` | `getBookPresentationContextRecursive(String definitionLabel)` Returns a book's presentation context, searching the entire tree recursively.
`String` | `getDefinitionLabel()` Returns the definitionLabel of this desktop.
`static DesktopPresentationContext` | `getDesktopPresentationContext(javax.servlet.http.HttpServletRequest request)` This is a convenience method for returning a reference to the one and only `DesktopPresentationContext`.
`PagePresentationContext` | `getDisplayedPagePresentationContext()` Return the last displayed page (not book).
`HeaderPresentationContext` | `getHeaderPresentationContext()` Get the header context for this desktop.
`LookAndFeelDefinitionId` | `getLookAndFeelDefinitionId()` Return the look and feel definition id.
`String` | `getLookAndFeelDefinitionLabel()` Return the look and feel definition label.
`PagePresentationContext` | `getPagePresentationContextRecursive(String definitionLabel)` Return a book or a page but traverse the entire tree; this will go inside books that are on pages too.
`PortletPresentationContext` | `getPortletPresentationContextRecursive(String instanceLabel)` Return the portlet presentation context matching the supplied instance label.
`PortletPresentationContext[]` | `getPortletsPresentationContextRecursive(String definitionLabel)` Return all portlet presentation contexts matching the supplied definition label.
`ShellPresentationContext` | `getShellPresentationContext()` Return a reference to the shell presentation context.
`String` | `getTitle()` Returns the title of this desktop instance.
`boolean` | `isAsyncModeDisabled()` Was desktop asyncMode set to `disabled` for this request?
`boolean` | `isAsyncModeEnabled()` Was desktop asyncMode set to `enabled` for this request?
`boolean` | `isDiscEnabled()` Is the Desktop attribute discEnabled currently set to true? Disc is WLP's Dynamic Interface Scripting environment, a JavaScript framework for client-side development.
`boolean` | `isDvtEnabled()` Is the Desktop attribute dvtEnabled currently set to true? This flag enables or disables dynamic visitor tooling functionality.

Methods inherited from class com.bea.netuix.servlets.controls.PresentationContext
`getAttributeRenderer, getChildren, getChildren, getFirstChild, getOrderedChildren, getParsedProperties, getPresentationClass, getPresentationId, getPresentationStyle, getProperties, getProperty, getProperty, getPropertyAsBoolean, getPropertyAsInt, getRenderFormat, getResolvedLocale, getTagName, isVisible, setVisible`

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

Field Detail

### CLASS_NAME

    protected static final String CLASS_NAME

Method Detail

### getDesktopPresentationContext

    public static DesktopPresentationContext getDesktopPresentationContext(javax.servlet.http.HttpServletRequest request)

  This is a convenience method for returning a reference to the one and only `DesktopPresentationContext`. Note this method will only work if called from within a portal (typically, from the desktop.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 DesktopPresentationContext, if any

### getShellPresentationContext

    public ShellPresentationContext getShellPresentationContext()

  Return a reference to the shell presentation context. This is a convenience method for returning the presentation context for the solitary, required child shell. This is equivalent to calling `getFirstChild("application:shell")`.

  Returns
    The child ShellPresentationContext instance or null if it does not exist
  See Also
    `#getChildren(String)`

### getLookAndFeelDefinitionId

    public LookAndFeelDefinitionId getLookAndFeelDefinitionId()

  Return the look and feel definition id. This method will only work for stremed portals.

  Returns
    look and feel definition id or null if portal file.

### getLookAndFeelDefinitionLabel

    public String getLookAndFeelDefinitionLabel()

  Return the look and feel definition label.

  Returns
    look and feel definition label as defined by the developer.

### getBookPresentationContext

    public BookPresentationContext getBookPresentationContext()

  Retrieve the main book (top level) presentation context. This is a convenience method for returning the solitary, primary book for the portal. This is especially useful since the primary book is not an immediate child of the desktop or shell.

  Returns
    A reference to the main book presentation context or null if it does not exist

### getBookPresentationContextRecursive

    public BookPresentationContext getBookPresentationContextRecursive(String definitionLabel)

  Returns a book's presentation context, searching the entire tree recursively. If you are interested in both books AND pages use `getPagePresentationContextRecursive()` as that method returns both.

  Parameters
    `definitionLabel` - The definition label of the book of interest
  Returns
    The book of interest or null if it is not found

### getPagePresentationContextRecursive

    public PagePresentationContext getPagePresentationContextRecursive(String definitionLabel)

  Return a book or a page but traverse the entire tree; this will go inside books that are on pages too.

  Parameters
    `definitionLabel` - The definition label of the page or book of interest
  Returns
    A PagePresentationContext (or BookPresentationContext if a book) of the page or book with a matching definition label

### getPortletPresentationContextRecursive

    public PortletPresentationContext getPortletPresentationContextRecursive(String instanceLabel)

  Return the portlet presentation context matching the supplied instance label.

  Parameters
    `instanceLabel` - The unique instance label of the desired portlet
  Returns
    A reference to the portlet's PresentationContext if it exists; null otherwise

### getPortletsPresentationContextRecursive

    public PortletPresentationContext[] getPortletsPresentationContextRecursive(String definitionLabel)

  Return all portlet presentation contexts matching the supplied definition label. Since many portlets can share the same definition label, more than one portlet can be returned. If you are interested in just one portlet then try `getPortletPresentationContextRecursive(String instanceLabel)`.

  Parameters
    `definitionLabel` - The label of the desired portlet
  Returns
    A non-null array of PortletPresentationContexts

### getDisplayedPagePresentationContext

    public PagePresentationContext getDisplayedPagePresentationContext()

  Return the last displayed page (not book). This method listens to Page Change events and remembers the last page that was activated in the Desktop. If no page changes have occurred then the first default page found will be returned.

  Returns
    Last displayed PagePresentationContext

### getTitle

    public String getTitle()

  Returns the title of this desktop instance. This value may be localized if localized values exist.

  Returns
    The desktop's localized title

### getDefinitionLabel

    public String getDefinitionLabel()

  Returns the definitionLabel of this desktop. This value should not be null.

  Returns
    The non-null definitionLabel for the desktop

### getHeaderPresentationContext

    public HeaderPresentationContext getHeaderPresentationContext()

  Get the header context for this desktop. Return null if there is no header.

### isAsyncModeEnabled

    public boolean isAsyncModeEnabled()

  Was desktop asyncMode set to `enabled` for this request?

  Returns
    true is asyncMode equals "enabled"

### isAsyncModeDisabled

    public boolean isAsyncModeDisabled()

  Was desktop asyncMode set to `disabled` for this request?

  Returns
    true is asyncMode equals "disabled"

### isDiscEnabled

    public boolean isDiscEnabled()

  Is the Desktop attribute discEnabled currently set to true? Disc is WLP's Dynamic Interface Scripting environment, a JavaScript framework for client-side development. Defaults to false if unset, but is enabled implicitly when either asyncMode or DVT is enabled.

  Returns
    true if Desktop attribute discEnabled is true.

### isDvtEnabled

    public boolean isDvtEnabled()

  Is the Desktop attribute dvtEnabled currently set to true? This flag enables or disables dynamic visitor tooling functionality. Defaults to false if unset.

  Returns
    true if Desktop attribute dvtEnabled is true.

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved