Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 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 BodyPresentationContext

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

    public class BodyPresentationContext

extends PresentationContext

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

See Also
  `getBodyPresentationContext(HttpServletRequest)`

Method Summary
`BodyAttributeRenderer` | `getAttributeRenderer()` Returns a renderer for body's attributes.
`static BodyPresentationContext` | `getBodyPresentationContext(HttpServletRequest request)` This is a convenience method for returning a reference to the one and only `BodyPresentationContext`.
`String` | `getEventHandlerScript(String eventHandlerName)` Returns any configured script code that should appear in an HTML/XHTML body's event handler attribute for the named event handler.
`List<String>` | `getEventHandlerStatements(String eventHandlerName)` Returns a list of script statements configured for this body element as specified in the look and feel's .skin, .skeleton, and/or skin.properties files.
`String` | `getOnloadScript()` Returns any configured onload script code that should appear in an HTML/XHTML body's onload attribute.
`String` | `getOnunloadScript()` Returns any configured 'onunload' script code that should appear in an HTML/XHTML body's 'onunload' attribute.
`Set<String>` | `getPopulatedEventHandlerNames()` Returns the names of any HTML/XHTML body tag event handlers that have had script statements added to them in the look and feel's configuration files (i.e.

Methods inherited from class com.bea.netuix.servlets.controls.PresentationContext
`getChildren, getChildren, getFirstChild, 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`

Method Detail

### getOnloadScript

    public String getOnloadScript()

  Returns any configured onload script code that should appear in an HTML/XHTML body's onload attribute. This information is the aggregation of code generated by components of the portal runtime and/or configured in the look and feel's .skin, .skeleton, and/or skin.properties file. This is a convenience method that can be used instead of `getEventHandlerScript(String)` with the argument "onload".

  Returns
    A string containing the aggregated script code to be executed after the body element has loaded into the consuming client (typically an HTML/XHTML browser supporting JavaScript or another client-side scripting language); this will return an empty string if no statements are configured for the onload event handler

### getOnunloadScript

    public String getOnunloadScript()

  Returns any configured 'onunload' script code that should appear in an HTML/XHTML body's 'onunload' attribute. This information is the aggregation of code generated by components of the portal runtime and/or configured in the look and feel's .skin, .skeleton, and/or skin.properties file. This is a convenience method that can be used instead of `getEventHandlerScript(String)` with the argument "onunload".

  Returns
    A string containing the aggregated script code to be executed after the body element has unloaded from the consuming client (typically an HTML/XHTML browser supporting JavaScript or another client-side scripting language); this will return an empty string if no statements are configured for the onunload event handler

### getPopulatedEventHandlerNames

    public Set<String> getPopulatedEventHandlerNames()

  Returns the names of any HTML/XHTML body tag event handlers that have had script statements added to them in the look and feel's configuration files (i.e. .skin, .skeleton, and/or skin.properties files). Each of the named event handlers in the resulting list will have a non-trivial script (obtained with `getEventHandlerScript(String)`), and therefore 1-n associated script fragments (obtained with `getEventHandlerStatements(String)`).

  Returns
    A list of strings containing the names of all body event handler names with non-trivial scripts associated with them

### getEventHandlerStatements

    public List<String> getEventHandlerStatements(String eventHandlerName)

  Returns a list of script statements configured for this body element as specified in the look and feel's .skin, .skeleton, and/or skin.properties files.

  Parameters
    `eventHandlerName` - The name of the event handler for which to fetch the list of statements; if the name specified is returned by `getPopulatedEventHandlerNames()`, then this list will contain at least one associated statement
  Returns
    The list of statements for the named event handler or an empty list if no statements are configured for that event handler
  See Also
    `getPopulatedEventHandlerNames()`

### getEventHandlerScript

    public String getEventHandlerScript(String eventHandlerName)

  Returns any configured script code that should appear in an HTML/XHTML body's event handler attribute for the named event handler. This information is the aggregation of code generated by components of the portal runtime and/or configured in the look and feel's .skin, .skeleton, and/or skin.properties file.

  Returns
    A string containing the aggregated script code to be executed after the body element has loaded into the consuming client (typically an HTML/XHTML browser supporting JavaScript or another client-side scripting language) or an empty string if no statements are configured for the named event handler

### getAttributeRenderer

    public BodyAttributeRenderer getAttributeRenderer()

  Returns a renderer for body's attributes. This renderer is intended to be used in skeleton files.

  Overrides:
    `getAttributeRenderer` in class `PresentationContext`

### getBodyPresentationContext

    public static BodyPresentationContext getBodyPresentationContext(HttpServletRequest request)

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

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

Copyright © 2006 BEA Systems, Inc. All Rights Reserved