|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bea.netuix.laf.PortalLookAndFeel
public class PortalLookAndFeel
PortalLookAndFeel
is the primary interface for interacting with the Look and Feel framework.
Instances of this class can be retrieved via calls to the getInstance
method(s). Various operations
are premitted through this and related interfaces, including: Skin and Skeleton resource lookup, dynamic dependency
configuration, and Look and Feel reinitialization.
The Skin
and Skeleton
classes provide read-only interfaces to retrieve information
related to the current Look and Feel configuration such as name and path information, the current chromosomes in
effect, and methods to resolve Look and Feel resources such as images and CSS files.
Render and Script dependencies can also be added through mechanisms available on this class. Any such dependencies will be aggregated by the Look and Feel framework and rendered as appropriate on the Poral page. This is the dynamic equivalent of specifying such dependencies via skin or skeleton configuration files.
Also possible through the various reinit()
methods provided by this class is the ability to
dynamically change the current Look and Feel. This allows, for example, the current skin and/or skeleton to be
changed on a per-request basis. NOTE: when using these methods any previously retrieved information related
to Look and Feel will be invalid. It is the responsibility of the application developer to ensure that such
information is updated as necessary.
Method Summary | |
---|---|
void |
addDynamicScriptDependency(String eventHandler,
String scriptFragment)
Adds a script fragment associated with the specified event handler. |
DynamicHtmlRenderDependencies |
getDynamicHtmlRenderDependencies()
Returns an instance of the DynamicHtmlRenderDependencies class to be used for dynamically adding
render dependencies. |
static PortalLookAndFeel |
getInstance(javax.servlet.http.HttpServletRequest request)
Returns an instance of the PortalLookAndFeel class associated with the current Look and Feel. |
static PortalLookAndFeel |
getInstance(javax.servlet.jsp.JspContext jspContext)
Returns an instance of the PortalLookAndFeel class associated with the current Look and Feel. |
Skeleton |
getSkeleton()
Returns a read-only object related to the current Look and Feel's skeleton. |
Skin |
getSkin()
Returns a read-only object related to the current Look and Feel's skin. |
void |
reinit(String skinName)
Calling this method reinitializes the Look and Feel with the specified values. |
void |
reinit(String skinName,
String skinPath)
Calling this method reinitializes the Look and Feel with the specified values. |
void |
reinit(String skinName,
String skinPath,
String skinChromosomeName)
Calling this method reinitializes the Look and Feel with the specified values. |
void |
reinit(String skinName,
String skinPath,
String skeletonName,
String skeletonPath)
Calling this method reinitializes the Look and Feel with the specified values. |
void |
reinit(String skinName,
String skinPath,
String skinChromosomeName,
String skeletonName,
String skeletonPath,
String skeletonChromosomeName)
Calling this method reinitializes the Look and Feel with the specified values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Skeleton getSkeleton()
reinit()
will cause all previously returned Skeleton
objects to become invalid.
Skeleton
object.public Skin getSkin()
reinit()
will cause all previously returned Skin
objects to become invalid.
Skin
object.public DynamicHtmlRenderDependencies getDynamicHtmlRenderDependencies()
DynamicHtmlRenderDependencies
class to be used for dynamically adding
render dependencies. The object returned from this method is valid only as long as the related
PortalLookAndFeel
object is valid.
PortalLookAndFeel
associated with the current Look and Feel.public void addDynamicScriptDependency(String eventHandler, String scriptFragment)
NOTE: Calls to reinit()
will not affect script fragments added via this method.
An example use of this method for an (X)HTML Look and Feel:
PortalLookAndFeel plaf = PortalLookAndFeel.getInstance(request); plaf.addDynamicScriptDependency("onload", "alert('Page Loaded');");
LIFECYCLE RESTRICTION: This method can only be called prior to the render
lifecycle; calls
during the render
lifecycle will cause an IllegalStateException
.
eventHandler
- The name of the event handler (i.e. "onload", "onunload", etc.)scriptFragment
- The script fragment to associate with the specified event handler
IllegalStateException
- If called during an inappropriate lifecycle.public void reinit(String skinName)
This is equivalent to calling reinit(skinName, null, null, null, null, null)
.
LIFECYCLE RESTRICTION: This method should only be called prior to the preRender
lifecycle;
calls during later lifecycles will cause undefined behavior.
skinName
- The name of the skin to be usedreinit(String, String, String, String, String, String)
public void reinit(String skinName, String skinPath)
This is equivalent to calling reinit(skinName, skinPath, null, null, null, null)
.
LIFECYCLE RESTRICTION: This method should only be called prior to the preRender
lifecycle;
calls during later lifecycles will cause undefined behavior.
skinName
- The name of the skin to be usedskinPath
- The webapp-relative base skin pathreinit(String, String, String, String, String, String)
public void reinit(String skinName, String skinPath, String skeletonName, String skeletonPath)
This is equivalent to calling reinit(skinName, skinPath, null, skeletonName, skeletonPath, null)
.
LIFECYCLE RESTRICTION: This method should only be called prior to the preRender
lifecycle;
calls during later lifecycles will cause undefined behavior.
skinName
- The name of the skin to be usedskinPath
- The webapp-relative base skin pathskeletonName
- The name of the skeleton to be usedskeletonPath
- The webapp-relative base skeleton pathreinit(String, String, String, String, String, String)
public void reinit(String skinName, String skinPath, String skinChromosomeName)
This is equivalent to calling reinit(skinName, skinPath, skinChromosomeName, null, null, null)
.
LIFECYCLE RESTRICTION: This method should only be called prior to the preRender
lifecycle;
calls during later lifecycles will cause undefined behavior.
skinName
- The name of the skin to be usedskinPath
- The webapp-relative base skin pathskinChromosomeName
- The name of the skin chromosome to be usedreinit(String, String, String, String, String, String)
public void reinit(String skinName, String skinPath, String skinChromosomeName, String skeletonName, String skeletonPath, String skeletonChromosomeName)
Specifying a null value for a parameter implies the use of configured values or internal defaults. For example, specifying only a skin name (with nulls for the remaining parameters) will imply the following values:
param | value |
---|---|
skinPath | /framework/skins |
skinChromosomeName | default |
skeletonName | default, or skin's target skeleton id |
skeletonPath | /framework/skeletons, or skin's target skeleton path |
skeletonChromosomeName | default |
This may produce unexpected results if the Look and Feel was originally configured with non-default values.
For this reason, current values retrieved from the Skin
and Skeleton
objects should generally
be used instead of null values.
LIFECYCLE RESTRICTION: This method should only be called prior to the preRender
lifecycle;
calls during later lifecycles will cause undefined behavior.
skinName
- The name of the skin to be usedskinPath
- The webapp-relative base skin pathskinChromosomeName
- The name of the skin chromosome to be usedskeletonName
- The name of the skeleton to be usedskeletonPath
- The webapp-relative base skeleton pathskeletonChromosomeName
- The name of the skeleton chromosome to be usedpublic static PortalLookAndFeel getInstance(javax.servlet.http.HttpServletRequest request)
PortalLookAndFeel
class associated with the current Look and Feel.
The object returned from this method is only valid for the specified request.
request
- The current request
PortalLookAndFeel
associated with the current Look and Feel.public static PortalLookAndFeel getInstance(javax.servlet.jsp.JspContext jspContext)
PortalLookAndFeel
class associated with the current Look and Feel.
The object returned from this call is only valid for the specified context. This method is intended for
use in situations where a HttpServletRequest
is not available, such as in certain JSP 2.0
tag classes.
jspContext
- A valid JspContext
PortalLookAndFeel
associated with the current Look and Feel.getInstance(HttpServletRequest)
|
Oracle Fusion Middleware Java API for Oracle WebLogic Portal 10g Release 3 (10.3.4) E14255-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |