ShowTable of Contents
EL Beans in WebSphere Portal 8.0
Expression Language (EL) beans are available for accessing WebSphere Programming models. These beans are accessed in the global wp namespace.
These provide access to Portal's models and associated classes. For more information on specific models, refer to the Portal 8.0 SPI Javadoc
.
EL Beans
|
Bean Name |
Description |
Example of use |
|
|
Provides read access to the current access control permissions for a resource.
|
${wp.ac[node].hasPermission['editor']}
|
|
|
Provides access to the metadata for a specified resource
|
|
|
|
Provides access to the client profile
|
${wp.clientProfile['DeviceClass']}
|
|
|
Provides access to a content node. This interface offers a way to obtain the type of the content node.
|
|
|
|
Provides access to the identification services serialize and deserialize methods.
|
${wp.identification[node]}
|
|
|
Provides access to the interface representing a container in a LayoutModel
|
|
|
|
Provides access to the interface representing a control in a LayoutModel
|
|
|
|
Provides access to the tree model representation of the layout of a page.
|
|
|
|
Returns a Map of the current MetaData object
|
${wp.node.metadata['metaDataKey']}
|
|
|
Provides access to the navigation model. The navigation model describes the toplogy of the navigation visible to a specific user.
|
|
|
|
Provides access to a navigation node in a navigation model.
|
|
|
|
Provides access to a selection model for a navigation model
|
${wp.selectionModel[node]}
|
|
|
Provides access to the set of configuration entries for the specified resource environment provider.
|
|
|
|
Provides access to the theme object
|
|
|
|
Encapsulates the theme "configuration" parameter lookup process.
|
${wp.themeConfig['themeurl']}
|
|
|
Provides access to list of theme objects
|
|
|
|
Provides access to the title of the currently rendered page or the title information set by a portlet.
|
|
|
|
Provides access to the active user
|
|
AccessControlRuntimeModelBean
This bean provides read access to the current access control permissions on one resource.
hasPermission
Parameters: com.ibm.portal.ac.data.RoleType
Returns: boolean value
Example:
${wp.ac[node].hasPermission['editor']}
isPrivate
Determine if the specified page is private.
Returns: boolean
Example:
${wp.ac[node].isPrivate}
hasPersonalizePermission
Determine if the specified page is a private page and the current user has PRIVILEGED_USER permission.
Returns: boolean
Example:
${wp.ac[node].hasPersonalizePermission}
hasEditSharedPermission
Determine if the page is a non-private page and the current user has EDITOR, MANAGER, or ADMIN permission for the specified page.
Returns: boolean
Example:
${wp.ac[node].hasEditSharedPermission}
hasAddChildPermission
Determine if the page is a non-private page and the current user has CONTRIBUTOR, EDITOR, MANAGER, OR ADMIN permission for the specified page.
Returns: boolean
Example:
${wp.ac[node].hasAddChildPermission}
AggregatedMetadataProviderBean
Provides access to the aggregated ContentMetaData model of a node. TheContentMetatData model provides access to the aggregated MetaData of content model nodes. The meta data that may be provided by individual nodes of the content model are combined according to the hierarchy that the ContentModel exposes for these nodes. Values set on the node itself take precedence over values set for its parents.
metadata
Parameters: ContentNode
Returns: Map of meta data entries.
Example:
${wp.metadata[node]}
Provides access to the defined attributes associated with the client profile.
Example:
${wp.clientProfile[attribute]}
The following displays how to access the device class information for the client profile:
<c:set var=”deviceClass” scope=”request” value=”${wp.clientProfile['DeviceClass']}” />
<c:choose>
<c:when test=”${deviceClass == 'desktop'}”>
<jsp:forward page=”/jsp/html/desktop/View.jsp”/>
</c:when>
<c:when test=”${deviceClass == 'tablet'}”>
<jsp:forward page=”/jsp/html/tablet/View.jsp”/>
</c:when>
<c:otherwise>
<jsp:forward page=”/jsp/html/View.jsp”/>
</c:otherwise>
</choose>
The ContentNodeBean represents a node in the ContentModel.
contentType
Returns:com.ibm.portal.content.ContentNodeType – COMPOSITION, EXTERNALURL, LABEL, PAGE, STATICPAGE
Example:
${wp.node.contentNodeType}
The following displays how to check if the currently selected node is a label:
<c:if test=”${wp.selectionModel.selected.contentNode.contentNodeType == com.ibm.portal.content.ContentNodeType.LABEL}”>
description
Returns: DescriptionBean associated with this content node
metadata
Returns: MeteDataBean associated with this content node
objectID
Returns: objectID associated with this content node.
Example:
${wp.contentNode.objectID}
title
Returns: TitleBean associated with this content node
Provides access to the identification services serialize and deserialize methods. The Identification interface provides serialization and deserialization functionality for ObjectID instances.
identification
Parameters: node
Returns: objectiid or String representation of the node
Example:
${wp.identification[node]}
Provides access to the interface representing a container in a layout model.
metaData
Returns: Map of metadata keys pairs for the container
objectID
Returns: Object Identifier for the current control.
Provides access to the interface representing a control in a layout model.
description
Returns the description set for the current control
metadata
Returns: Map of metadata key pairs for the control
objectID
Returns: Object identifier for the current control.
title
Returns: Title of the control
This bean provides access to the tree model for the layout of a page. The nodes of the tree are objects implementing the LayoutNode interface. This model describes the layout of a page (row and column containers, LayoutContainer) and the content (controls representing portlets, LayoutControl).
layoutModel
Provides the layout model of the given node
Parameters: Node
Returns: iterator of layout nodes
Example:
${wp.layoutModel[node]}
The following displays an example of getting the layout model for the currently selected node from the selection model. The second line retrieves the children of the root mode of the layout model.
<c:set var="layoutmodel" value="${wp.layoutModel[wp.selectionModel.selected]}"/>
<c:set var="containers" value="${layoutmodel.children[layoutmodel.root]}"/>
children
Parameters: Node
Returns: children of the specified nodes
Example:
<c:set var="containers" value="${layoutmodel.children[layoutmodel.root]}"/>
hasChildren
Determine if the current layout model has children
Parameters: Node
Returns: boolean
Example:
${layoutmodel.hasChildren[node]}
root
Returns: root node of the model
Returns a Map of the current MetaData object
metadata
Returns: Set of metadata key pairs for the specified node
Example:
${wp.node.metadata}
metadata['keyname']
Parameter: Metadata key
Returns: Associated value
Example:
${node.metadata["someKey"]}
Provides access to the NavigationModel. The navigation model describes the toplogy of the navigation visible to a specific user. The nodes of the model are represented by NavigationNodes.
children
Parameter: node
Returns: Children of the specified node.
Example:
${wp.navigationModel.children[parentNode]}
hasChildren
Determine if the specified Navigation Node has associated nodes
Parameters: Node
Returns: booleanWhether
Example:
${wp.navigationModel.hasChildren[node]}
navigationModel
Returns: iterator of Navigation Nodes in the navigation model
The nodes are NavigationBean nodes. The accessors for the NavigationBean can be used on a node in the navigationModel. Below is an example,
<c:set var="layoutTemplate" ><c:out value='${wp.navigationModel[wp.selectionModel.selected.contentNode.objectID].metadata["layout"]}' default=""/></c:set>
parent
Parameters: node
Returns: Parent node of the specified Navigation Node
Example:
${wp.ac[wp.navigationModel.parent[node]}
Provides access to a navigation node in a navigation model.
contentNode
Returns: content node associated with the current navigation node
Example:
${node.contentNode]}
description
Returns: Returns the description of this object
Example:
${wp.node.description}
isPrivate
Determine if the current node is marked as private
Returns: boolean.
Example:
${wp.node.isPrivate}
metadata
Returns: Metadata associated with the current node
Example:
${wp.node.metadata}
objectID
Returns: The objectID associated with the current node
projectID
Returns: The project identifier associated with the current node
title
Returns: Title associated with the current object.
Example:
${wp.title }
NavigationSelectionModelBean
This bean provides access to the interface describing a selection model for a navigation model (NavigationModel). Elements of this model implement the NavigationNode interface. Input and output values must implement this interface.
selectionModel
Returns: The iterator of selected Navigation nodes.
Example:
${wp.selectionModel}
selected
Returns: Selected Navigation node
Example:
${wp.selectionModel.selected}
selectionPath
Returns: List of currently selected Navigation nodes
Example:
${wp.selectionModel.selectionPath}
ResourceEnvironmentProviderAccessorBean
Provides access to the set of configuration entries for the specified resource environment provider.
Provides access to the theme object.
metadata
Returns: Metadata associated with this theme.
title
Returns: Title associated with the theme
description
Returns: Description associated with the theme
Encapsulates the theme "configuration" parameter lookup process.
themeConfig
Encapsulates the theme “configuration” parameter lookup process. The lookup order is as follows: 1. Theme metadata 2. Provided Resource Environment Provider
Example:
<c:set var="themeModuleContextRoot" value="${wp.themeConfig['resources.modules.ibm.contextRoot']}" />
Provides access to the model for a list of installed portal themes. Elements of this model are implemented by Theme objects. The ThemeBean provides access to the Theme objects.
themeList
Returns: Iterator of theme bean objects.
current
Provides access to the theme of the current selected node
Example:
${wp.themeList.current]}
Provides access to the title of the currently rendered page or the title information set by a portlet.
title
Return: The title of the currently rendered page or the title information set by a portlet.
Example:
${wp.title}
Provides access to the active user
user
Return: Current active portal user
Example:
${wp.user}
objectID
Return the object identifier for the current user
Example:
${wp.identification[wp.user.objectID]}