Oracle® Fusion Middleware Developer's Guide for Oracle WebCenter 11g Release 1 (11.1.1.4.0) E10148-12 |
|
Previous |
Next |
This appendix catalogs the Expression Language expressions (ELs) available for use with the custom portals and applications you create using Oracle WebCenter Framework. Some of these expressions can be used in both WebCenter Framework and WebCenter Spaces. The Context column indicates whether the EL is exclusive to WebCenter Framework (WCF) or can be used with both (Both).
This appendix includes the following sections:
See Also: For additional information about EL APIs, see Oracle Fusion Middleware Java API Reference for Oracle WebCenter. |
Table G-1 lists an EL expression relevant to the application and describes the type of functionality it provides. The listed EL applies to both WebCenter Framework and WebCenter Spaces.
Table G-1 EL Expression Relevant to the Application
Expression | Function |
---|---|
|
Returns the name of the ADF Faces skin family being used for the current web request, depending on factors such as what has been configured at the application level, the current user's preference setting, and so on. Returns the same value as |
Table G-1 lists EL expressions relevant to application security, describes the types of functionality they provide, and indicates the context in which each expression can be used.
Table G-2 EL Expressions Relevant to Security
Expression | Function | Context |
---|---|---|
|
Returns the user name of the currently logged in user. If the current user is not logged in, this expression returns no value. |
Both |
|
Returns the value |
Both |
|
Returns the value Example: #{WCSecurityContext.userInAppRole['AppConnectionManager']} |
WCF |
|
Returns the value true if the current user is assigned the specified group, for example: #{WCSecurityContext.userInGroup['Administrators']} |
Both |
Table G-2 lists EL expressions relevant to general application settings and describes the types of functionality they provide. All listed ELs apply to both WebCenter Framework and WebCenter Spaces.
Table G-3 EL Expressions Relevant to General Settings
Expression | Function |
---|---|
|
Returns the time zone the current user has selected in application preferences. |
|
Returns the date format the current user has selected in application preferences. |
|
Returns the current user's preferred date format pattern if it has been set, else, returns Note that date + pattern is applicable only to custom WebCenter applications, where they take precedence over date + style if they are set. |
|
Returns the time format the current user has selected in application preferences. |
|
Returns the current user's preferred time format pattern if it has been set, else, returns |
|
Returns the current user's preferred date and time format pattern if it has been set, else, returns |
|
Returns the current user's preferred accessibility mode (either |
|
The current user's preferred skin name if one is specified, otherwise the default value. |
|
Returns the current date in the current user's selected locale. |
|
Returns the current time in the current user's selected locale. |
|
Returns the current date and time in the current user's selected locale. |
|
Returns the name of the ADF Faces skin family being used for the current web request, depending on factors such as what has been configured at the application level, the current user's preference setting, and so on. |
Use the expressions in this section to query for resources. Querying for a resource through an EL expression is similar to querying for it through an API call. That is, you must set query parameters in the format .
property
['
value
']
, where property
is the name of the property, for example, id
, resourceScope
, and the like, and value
is the search value for the attribute.
A query can result in single or multiple results. The query designer must decide what is wanted. The query designer determines whether to return one or multiple results by encountering one of the following values in the expression:
singleResult
—Returns a single resource. When no matching resource is found, null is returned.
resultList
—Returns a list of resources. When no matching resources are found, an empty list is returned.
Note: Occurrences ofsingleResult or resultList in the expression are used internally as the query end point, and, after this, the query is executed immediately. Anything set after the end point can result in unexpected behavior. |
The following example returns the first template resource found with a display name that contains myPage
:
#{srmContext.resourceType['siteTemplate'].displayName['myPage'].singleResult}
The following example returns a list of template resources residing in the directory resourceDir
, with a description that contains sampleDesc
:
#{srmContext.resourceType['siteTemplate'].description['sampleDesc'].contentDirectory['resourceDir'].resultList}
A property of this class includes any attribute of this class. Example properties include: Id
, DisplayName
, iconURI
, contentDirectory
, and the like.
The property value can be an explicit value or an EL expression that returns that type of value. For example, the following two queries return the same result:
#{srmContext.id['resourceId
'].singleResult}
#{srmContext.id['spacesContext.currentSpace.uiMetadata.siteTemplateId'].singleResult}
You can use any property of this class in an EL-based query in the format property
['
value
']
and in any order. For example, the following two queries return the same result:
#{srmContext.resourceScope['scopeName
'].id['resourceId
'].singleResult} #{srmContext.id['resourceId
'].resourceScope['scopeName
'].singleResult}
Table G-4 lists EL expressions relevant to WebCenter resources and describes the types of functionality each provides. You can use all resource EL expressions in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper.
Many of the expressions in Table G-4 are building blocks for narrowing down the resource or resources you want returned. That is, they are not necessarily meant to be used by themselves, but rather in an assembly of ELs to form the desired query.
For example, the following expression uses three resource-related ELs to form a single query that returns a particular Space template. It retrieves the template storesMasterTemplate
from the parent Space stores
:
#{srmContext.resourceScope['stores'].resourceType['siteTemplate'].displayName['storesMasterTemplate'].singleResult}
Table G-4 ELs Relevant to WebCenter Site Resources
EL | Function |
---|---|
|
Returns the resource with the specified ID |
|
Returns any resources with the specified display name |
|
Returns any resources with the specified display name key |
|
Returns one result of a resource that contains the specified value in its description To get multiple results, use |
|
Returns one result of a resource with the specified description key The description key is the key in the To get multiple results, use |
|
Returns any resource with the specified creation date |
|
Returns any resource that was last modified by the user with the specified user name |
|
Returns any resource that was last modified by the specified date |
|
Returns any resource that falls within the specified scope |
|
Returns any resource that falls within the specified category For example: #{srmContext.category['siteTemplates']} |
|
Returns any resource that is stored within the specified directory |
|
Returns resource metadata from the specified metadata file For example, the following expression returns resource metadata from the following file #{srmContext.metadataFile['/home/metadat/data.xml']} |
|
Returns any For example, the following expression returns the #{srmContext.jspx['/home/web/page.jspx']} |
|
Returns any |
|
Returns the icon at the specified icon URI |
|
In a larger expression, returns all specified resources except those available in the excluded scopes |
|
In a larger expression, returns any resource the either does or does not use custom security Set
|
|
In a larger expression, returns any resource that is or is not seeded, depending on the provided value Set #{srmContext.seeded['TRUE']} |
|
In a larger expression, returns any resource that is of the specified type of visibility Set #{srmContext.visibleType['TRUE']} |
|
In a larger expression, returns one or multiple resources with visibility set to either |
|
In a larger expression, returns any resource created by the specified user |
|
In a larger expression, returns one or multiple resources of the specified type For example, the following expression searches for a resource of the type #{srmContext.resourceType['SITE_TEMPLATE']} Note that all resource types are listed in Oracle Fusion Middleware Java API Reference for Oracle WebCenter, in the |
|
In a larger expression, returns one or multiple resources available in the application of the specified version |
|
In a larger expression, returns one or multiple resources available in the specified scope For example, the following expression searches for resources in the scope (in this instance, the Space) #{srmContext.resourceScope['MySpace']} To search in the default scope, that is, the application scope, use |
|
In a larger expression, returns one or multiple resources that contain or equal the values set by other included expressions Set |
Table G-4 lists EL expressions relevant to application navigation and describes the types of functionality they provide. All listed navigation ELs apply to both WebCenter Framework and WebCenter Spaces.
Table G-5 EL Expressions Relevant to Navigation
Expression | Function |
---|---|
Navigation Context Expressions |
|
|
Returns default navigation model. It gets the value from the preference bean. The preference bean gets the value based on the preference setting in The following example returns the specified default tree model: #{navigationContext.defaultNavigationModel.defaultTreeModel} You can also use |
|
Returns the navigation model used to navigate to the current view (that is, the current page) There may be a number of navigation models on the page. Only the one used to navigate to the page is the current navigation model. The current navigation model is set only when the The following example returns the default tree model for the current navigation model: #{navigationContext.currentNavigationModel.defaultTreeModel} You can also use See Also: |
|
Returns the navigation model specified by path. Example: #{navigationContext.navigationModel['/oracle/webcenter/portalapp/navigations/default-navigation-model']} User can simply enter the path in the square bracket without having to remember the parameter name. For backward compatibility, comma-separated parameters are also supported. Available parameters (with examples) are:
Note: #{navigationContext.navigationModel['modelScope=/oracle/webcenter/portalapp/navigations,modelId=default-navigation-model']} |
|
Returns the default navigation method for binding to UI component's The Example using the
<af:forEach var="node" varStatus="vs"
items="#{navigationContext.defaultNavigationModel.rootNode.children}">
<af:subform id="pt_sfm1">
<af:commandLink id="pt_cl1"
text="#{node.title}"
inlineStyle="font-size:small;color:White;"
actionListener="#{navigationContext.processAction}"
action="pprnav">
<f:attribute name="node" value="#{node}"/>
<af:showPopupBehavior popupId="menuPopup"
align="afterStart"
triggerType="mouseOver"/>
</af:commandLink>
Example using the <af:commandLink id="pt_cl1" text="Prescriptions" inlineStyle="font-size:small; color:White;" actionListener="#{navigationContext.processAction}" action="pprnav"> <f:attribute name="path" value="/prescriptions"/> <f:attribute name="model" value="#{navigationContext.defaultNavigationModel}"/> </af:commandLink> |
Navigation Model Expressions |
|
|
Returns a tree/menu/list model based on the default settings The default values for the settings are specified in the next row. For example, the default value for For This expression returns a model of type:
|
|
Returns tree/menu/list model based on the specified comma-separated parameters. Available parameters (with default values as examples) are:
For Example: #{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=false,depth=2']} |
|
Returns a root node (of type Example: <af:commandLink id="pt_cl1" text="Prescriptions" inlineStyle="font-size:small; color:White;" actionListener="#{navigationContext.processAction}" action="pprnav"> <f:attribute name="node" value="#{navigationContext. defaultNavigationModel. rootNode.children[2]"/> </af:commandLink> |
|
Returns a node (of type Example: #{navigationContext.defaultNavigationModel.node['home/page1']} |
|
Returns currently selected navigation resource. |
|
Sets the current selection to a node specified by the given path (you do not need "/" prefix unless you are requesting the root node, for example, The user must have the ability to explicitly set the current selection without having to actually navigate to a node. This can be used where the user enters a page directly, and no selection is set. It provides a mechanism for the user to control what is the default when there is no current selection. Example: <c:set value="${navigationContext.defaultNavigationModel.newCurrentSelection['home/page1']}" var="currSel" scope="session"/> <c:if test="${currSel!=null}"> <af:forEach items="#{currSel.children}" var="cnode" varStatus="cnodestatus"> ...</c:if> |
|
Returns the value of the specified attribute of the navigation model. |
Navigation Resource Expressions |
|
|
Returns the value of the specified attribute of the navigation resource. |
|
Returns the value of the specified parameter of the navigation resource. |
|
Returns the raw value of the specified parameter of the navigation resource (before it is evaluated). |
|
Returns the title of the navigation resource. |
|
Returns the path to the navigation resource. |
|
Returns the URL for the navigation resource of type |
|
Returns the identifying path for this navigation resource. |
|
Returns a collection of identifying paths by depth to enable its use as a starting path to drive another navigation view. For example, assuming the
|
|
Returns the identifying path for this navigation resource suitable for <af:goLink id="pt_gl2" text="#{node.title}" destination="#{node.goLinkPrettyUrl}" targetFrame="#{node.attributes['Target']}" inlineStyle="font-size:small;#{node.selected ? 'font-weight:bold;' : ''}"/> |
|
Returns whether this resource is a separator item. |
|
Returns whether it is possible to navigate to this resource. |
|
Returns whether this resource is currently selected. |
|
Returns whether the resource is the currently selected resource and the model is the currently selected model. |
|
Returns whether this node lies on the selected path. This is useful for highlighting the selected tab, for example. For example, assuming the currently selected node is <c:set value="${navigationContext.defaultNavigationModel.node['home']}" var="home" scope="session"/> <af:commandImageLink id="cil1" icon="#{(home.onSelectedPath) ? '/images/caremark/nav/HomeSelected.png' : '/images/caremark/nav/HomeIcon.png'}" actionListener="#{navigationContext.processAction}" action="pprnav"> <f:attribute name="node" value="#{home}"/></af:commandImageLink> |
|
Returns whether this resource is a leaf node. |
|
Returns the parent node (of type |
|
Returns the hierarchy list of ancestors of this node (of type NavigationResource) starting with the root node. For example, assuming the current node is
|
|
Returns the depth of this node from the root node. Root node has a depth of zero. |
|
Returns the list of siblings (of type |
|
Returns the next sibling in the list (of type NavigationResource) of this node. For example, the following code ensures that you do not output two separators in a row: <c:if test="${(node.separator) && (!node.nextSibling.separator}"> <af:separator id="s166"/> </c:if> |
|
Returns the previous sibling in the list (of type |
|
Returns the zero-relative index of this node relative to its siblings. |
|
Returns a collection of child resources. |
|
Returns the number of children of this node. |
|
Returns the child node (of type If not found, this returns |
|
Returns the child node (of type The path can be deeper than one level and does not need the |
Table G-5 lists EL expressions relevant to Oracle WebCenter Services and describes the types of functionality they provide. All listed ELs apply to both WebCenter Framework and WebCenter Spaces.
Table G-6 EL Expressions Relevant to Services
Expression | Function |
---|---|
|
An #{webcenterService['oracle.webcenter.doclib']} For service IDs, see Table G-7. |
|
Returns a Boolean value that indicates whether the WebCenter service with the service ID #{webcenterService['oracle.webcenter.collab.forum'].configured} For service IDs, see Table G-7. |
|
Returns the forum ID of the specified Space discussion forum. Enter the Space name in lieu of |
|
Returns the category ID of the specified Space discussion forums. Enter the Space name in lieu of |
Table G-7 lists service IDs associated with Oracle WebCenter Services.
Table G-7 Service IDs
Service | ID |
---|---|
Announcements |
oracle.webcenter.collab.announcement |
Discussions |
oracle.webcenter.collab.forum |
Documents and Wikis |
oracle.webcenter.doclib |
Events |
oracle.webcenter.collab.calendar.community |
Instant Messaging and Presence (IMP) |
oracle.webcenter.collab.rtc |
Links |
oracle.webcenter.relationship |
Lists |
oracle.webcenter.list |
|
oracle.webcenter.collab.mail |
Notifications |
oracle.webcenter.notification |
Page |
oracle.webcenter.page |
People Connections: Activity Stream |
oracle.webcenter.activitystreaming |
People Connections: Connections |
oracle.webcenter.peopleconnections.connections |
People Connections: Feedback |
oracle.webcenter.peopleconnections.kudos |
People Connections: Message Board |
oracle.webcenter.peopleconnections.wall |
People Connections: Profile |
oracle.webcenter.peopleconnections.profile |
Polls |
oracle.webcenter.collab.survey |
Recent Activities |
oracle.webcenter.recentactivity |
Activity Graph |
oracle.webcenter.activitygraph |
RSS |
oracle.webcenter.rss |
Search |
oracle.webcenter.search |
Tags |
oracle.webcenter.tagging |
Blogs |
oracle.webcenter.blog |
Worklist |
oracle.webcenter.worklist |
Table G-8 lists EL expressions relevant to the Documents service and describes the types of functionality they provide. All listed ELs apply to both WebCenter Framework and WebCenter Spaces.
Table G-8 EL Expressions Relevant to the Documents Service
Expression | Function |
---|---|
|
Gets the default content repository connection name. Returns |
|
Checks whether the Documents service is configured. Returns |
Table G-9 lists EL expressions relevant to the Profile feature of the People Connections service and describes the types of functionality they provide. All listed ELs apply to both WebCenter Framework and WebCenter Spaces.
Note: The entrysecurityContext.userName , included in every Profile expression, returns the name of the current user. Note also that information is returned only if it is present in the user's profile. If the information is not included in the profile, a null value is returned. |
Table G-9 EL Expressions Relevant to the People Connections Service (Profile)
Expression | Function |
---|---|
|
The display name of the specified user's manager if the current user is allowed to know it. |
|
The specified user's employee number if the current user is allowed to know it. |
|
The post office box number associated with the specified user if the current user is allowed to know it. |
|
The time zone in which the specified user's home office is located if the current user is allowed to know it. |
|
A description of the specified user (from Profile "About Me") if the current user is allowed to know it. |
|
The department to which the specified user belongs if the current user is allowed to know it. |
|
The specified user's business pager number if the current user is allowed to know it. |
|
The city in which the specified user is located if the current user is allowed to know it. |
|
The specified user's surname or last name before marriage if the current user is allowed to know it. |
|
The specified user's business fax number if the current user is allowed to know it. |
|
The specified user's date of hire if the current user is allowed to know it. |
|
Additional information appended to the user's name, such as |
|
The specified user's middle name if the current user is allowed to know it. |
|
The specified user's home phone number if the current user is allowed to know it. |
|
The specified user's employee type classification, for example, |
|
The specified user's surname or last name if the current user is allowed to know it. |
|
The specified user's birthday if the current user is allowed to know it. |
|
The state in which the specified user's home office is located if the current user is allowed to know it. |
|
The specified user's home street address if the current user is allowed to know it. |
|
The street on which the specified user's home office is located if the current user is allowed to know it. |
|
The specified user's postal or ZIP code if the current user is allowed to know it. |
|
The specified user's initials if the current user is allowed to know it. |
|
The specified user's first name if the current user is allowed to know it. |
|
The organizational unit to which the specified user belongs, for example, |
|
The specified user's wireless account number if the current user is allowed to know it. |
|
The specified user's business telephone number if the current user is allowed to know it. |
|
The country in to which the specified user is assigned if the current user is allowed to know it. |
|
The specified user's preferred language if the current user is allowed to know it. |
|
The specified user's display name if the current user is allowed to know it. |
|
The specified user's actual name if the current user is allowed to know it. |
|
The specified user's job title if the current user is allowed to know it. |
|
The specified user's business email address if the current user is allowed to know it. |
|
The organzation to which the specified user belongs, for example, |
|
The specified user's cell or mobile phone number if the current user is allowed to know it. |
|
The specified user's business expertise if the current user is allowed to know it. |
Table G-10 lists EL expressions relevant to the Personalization+ service and describes the types of functionality they provide. All listed ELs apply to both WebCenter Framework and WebCenter Spaces.
Table G-10 EL Expressions Relevant to the Personalization Service