|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.netuix.servlets.controls.ControlContext
com.bea.netuix.servlets.controls.PresentationContext
public abstract class PresentationContext
The portal framework provides instances of subclasses of PresentationContext
during portal rendering, actions, and in backing files. PresentationContext
subclasses are used to
represent portal framework components during the portal's rendering phase and are almost exclusively read
only (the exception being the setVisible
method to allow fine-grained rendering of components in
skeleton files). PresentationContext
subclasses are primarily targetted for use by skeleton JSPs in
portal look and feel implementations.
Method Summary | |
---|---|
PresentationContextAttributeRenderer |
getAttributeRenderer()
Returns a renderer for the component's attributes. |
List |
getChildren()
Returns a list of PresentationContext children of this context, if any. |
List |
getChildren(String tagName)
Returns a list of PresentationContext children of this context, if any, narrowed by by the specified
tag name. |
PresentationContext |
getFirstChild(String tagName)
Given a tag name, return an instance of the component's PresentationContext subclass, if it exists
as a child. |
List<PresentationContext> |
getOrderedChildren()
Returns a list of PresentationContext children of this context, if any, in the order that they are
specified in the portal tree hierarchy. |
Properties |
getParsedProperties()
Get the extra properties of the component, if they exist. |
String |
getPresentationClass()
Get the presentation class of the component, if it exists. |
String |
getPresentationId()
Get the presentation id of the component, if it exists. |
String |
getPresentationStyle()
Get the presentation style of the component, if it exists. |
String |
getProperties()
Get the extra properties string of the component, if it exists. |
String |
getProperty(String key)
Get a property of the underlying component. |
String |
getProperty(String key,
String defaultValue)
Get a property of the underlying component, using the specified default if none exists. |
boolean |
getPropertyAsBoolean(String key,
boolean defaultValue)
Get a property of the underlying component, using the specified default if none exists. |
int |
getPropertyAsInt(String key,
int defaultValue)
Get a property of the underlying component, using the specified default if none exists. |
RenderFormat |
getRenderFormat()
Returns the currently configured render format information detailing the format in which the portal will be rendered for the current request. |
Locale |
getResolvedLocale()
Returns the Locale associated with the best matching portal component resource based on user request locale preferrences. |
String |
getTagName()
Get the tag name of the component this context represents. |
boolean |
isVisible()
Tests whether or not the component represented by this context is visible, and therefore whether or not it should be rendered. |
void |
setVisible(boolean visible)
Set the visiblity state of the component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public PresentationContextAttributeRenderer getAttributeRenderer()
public String getPresentationId()
public String getPresentationClass()
public String getPresentationStyle()
public String getTagName()
namespace:tagname
, where the namespace corresponds to the parent package
in which the context is defined (e.g. a book's full tag name would be page:book
).
#getChildren
public Locale getResolvedLocale()
public String getProperties()
my-first-key: my-first-value; my-second-key: my-second-value;Any number of properties may be in a properties string.
getParsedProperties()
public Properties getParsedProperties()
Properties
class returned by this method is the parsed view of
those from getProperties()
.
getProperties()
public String getProperty(String key)
key
argument should not be null.
key
- The property key
public String getProperty(String key, String defaultValue)
key
argument
should not be null.
key
- The property keydefaultValue
- The value to use if no value is found for the specified key
public int getPropertyAsInt(String key, int defaultValue)
key
argument should not be null. This is
a convenience method that attempts a conversion of the value from a
String
to an int. Failure during conversion or the key being null
causes the default value to be returned.
key
- The property keydefaultValue
- The value to use if no value is found for the specified key
public boolean getPropertyAsBoolean(String key, boolean defaultValue)
key
argument should not be null. This is
a convenience method that attempts a conversion of the value from a
String
to a boolean. Failure during conversion causes a
value of false
to be returned. The default value is used
if the key lookup in the properties instance returned null
or if the key itself was null.
key
- The property keydefaultValue
- The value to use if no value is found for the specified key
public PresentationContext getFirstChild(String tagName)
PresentationContext
subclass, if it exists
as a child. The first child matching the specified tag name is returned.
tagName
- The namespace-qualified tag name namespace:tagname
public List getChildren(String tagName)
PresentationContext
children of this context, if any, narrowed by by the specified
tag name. If no children exist for that tag name, an empty list is returned. Elements of the list are all
descendents of the type PresentationContext
. The returned list is for immediate children only --
there is no recursion into childrens' children. This list is unmodifiable.
tagName
- The namespace-qualified tag name namespace:tagname
public List getChildren()
PresentationContext
children of this context, if any. If no children exist, an
empty list is returned. Elements of the list are all descendents of the type PresentationContext
,
and are returned with like elements grouped together, but otherwise in no particular order. The returned list is
for immediate children only -- there is no recursion into childrens' children.
Note, this list is modifiable! Avoid mutating the list (or at least use caution if you do).
getOrderedChildren()
public List<PresentationContext> getOrderedChildren()
PresentationContext
children of this context, if any, in the order that they are
specified in the portal tree hierarchy. Elements of the list are all descendents of the type
PresentationContext
. The returned list is for immediate children only -- there is no recursion
into childrens' children.
Note, this list is modifiable! Avoid mutating the list (or at least use caution if you do).
getChildren()
public void setVisible(boolean visible)
false
will cause the beginRender
and endRender
methods to
not be called during the render lifecycle stage.
visible
- The boolean
value to set the visibility statepublic boolean isVisible()
public RenderFormat getRenderFormat()
|
Copyright © 2008 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |