A Expression Language Expressions
Topics:
Introduction to Expression Language (EL) Expressions
ELs Related to WebCenter Portal Information
ELs Related to Specific Portals
ELs Related to Portal Event Contexts
ELs Related to General Settings
ELs Related to Portal Resources
ELs Related to Tools and Services
ELs Related to People Connections
EL Expressions Related to the Page Editor
EL Expressions Related to Device Settings
Built-In Expressions in the Expression Editor
Desupport of Freeform JPQL WHERE and SORT Clauses in Portal Queries
See Also:
For additional information about EL APIs, see Oracle WebCenter Portal Java API Reference.
A.1 Introduction to Expression Language (EL) Expressions
When configuring page components or assets, you can express values as variables that take advantage of the current application context. For example, you can use variables to obtain the name of the current user, the user's assigned role, the state of the current page, and so on. Such flexibility is made possible by using EL expressions created in JDeveloper using the Expression Builder, or at runtime using the Expression Editor.
This section includes the following subsections:
A.1.1 Introducing the Expression Builder
You can use EL expressions in JDeveloper to bind attributes to object values determined at runtime. At runtime, the value of certain components is determined by their value attribute. While a component can have static text as its value, typically the value attribute will contain an EL expression that the runtime infrastructure evaluates to determine what data to display.
You can create EL expressions using the Expression Builder in JDeveloper. You can access the builder from the Property Inspector. In the Property Inspector, locate the attribute you wish to modify and click the Property Menu icon, and select choose Expression Builder from the popup (Figure A-1).
Figure A-1 Accessing the Expression Builder

Description of "Figure A-1 Accessing the Expression Builder"
In the Expression Builder dialog (Figure A-2), you can directly type your EL expression in the Expression box. You can also use the Variables drop-down list to select items that you want to include in the expression. Use the operator buttons to add logical or mathematical operators to the expression.
For more information about Expression Builder, see Getting Started with ADF Faces in Developing Web User Interfaces with Oracle ADF Faces.
A.1.2 Introducing the Expression Editor in WebCenter Portal
The Expression Editor is a simple Expression Language (EL) editor. Use the Expression Editor when you want to formulate a dynamic computation for an otherwise unknown property value, such as the current user or the current page mode.
In the Expression Editor, you can select either:
-
Choose a value, then select predefined values from the drop-down lists.
The values are categorized according to the type of information an expression returns. Select a category from the first menu, and then select the type of value you want returned from the second menu.
For example, rather than entering
#{pageDocBean.createdBy}
, you can click Choose a value, then selectPage Info
and thenCreated By
. -
Type a value or expression, then enter your own value or an EL expression for the associated property. Use the following formats to enter values:
-
a literal number:
#{123}
-
a literal string:
#{'string'}
-
a literal Boolean:
#{true}
-
a Java Bean called to return a value:
#{generalSettings.preferredTimeStyle}
Click the Test button to validate your EL syntax and evaluate the expression. Any non-EL value type you enter, such as plain text, HTML tags, or junk characters, is not validated. Validation checks the EL syntax and evaluates the expression. Expression values vary according to the context in which they are executed, so the resulting value of this test will likely differ from the value returned during actual use.
-
A.2 ELs Related to WebCenter Portal Information
The following table lists EL expressions relevant to WebCenter Portal information and describes the type of functionality they provide.
Table A-1 EL Expressions Relevant to WebCenter Portal Information
Expression | Function |
---|---|
|
An |
|
Returns a URL representing the current web request with bookmarkable WebCenter Portal URL parameters of the request appended to the end (parameters are not necessarily in a fixed order). Example: http://www.example.com/webcenter/faces/oracle/webcenter/page/scopedMD/someguid/SomePage.jspx?wc.contextURL=/spaces/somename&wc.pageScope=1234 |
|
An |
|
Returns the display name of the current WebCenter Portal application (as configured through WebCenter Portal Administration settings). Out of the box, this returns WebCenter Portal. |
|
If an application logo was uploaded through WebCenter Portal Administration settings, this expression returns the URL to the application logo image. Out of the box, this returns null. |
|
Returns the URL to the Help application used for WebCenter Portal (as configured through WebCenter Portal Administration settings). Out of the box, this returns /webcenterhelp/spaces. |
|
If a copyright message was configured through WebCenter Portal Administration settings, this expression returns the application copyright message. Out of the box, this returns |
|
Returns the URL to the document that contains the application's privacy policy (as configured through WebCenter Portal Administration settings). Out of the box, this returns |
|
Returns the name of the default ADF Faces skin family to use for rendering pages in the application (as configured through WebCenter Portal Administration settings). This expression represents only the application-level setting that may not necessarily be used in all web requests. For example, you cannot use it successfully if a user has chosen to override the skin through application Preferences. |
|
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 |
A.3 ELs Related to Specific Pages
The following table lists EL expressions relevant to portal pages and describes the types of functionality they provide.
Table A-2 EL Expressions Relevant to Specific Pages
Expression | Function |
---|---|
|
Returns the page display name, for example: FinanceProject |
|
Returns the user name of the person who created the page, for example: monty |
|
Returns the date and time the page was created, for example: 2008-11-19T10:18:36 |
|
Returns the user name of the person who last updated the page, for example: monty |
|
Returns the date and time the page was last updated, for example: 2008-11-19T10:18:36 |
|
Returns the file directory path to the page relative to the application root directory, for example: /oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/user/Umonty/Page4.jspx |
|
Returns the file name of the page, for example: Page4.jspx |
|
Returns the name of the style scheme used on the page, for example: WCSchemeEggShell |
|
Returns the directory path and file name of the page scheme background image. |
|
Returns the hexadecimal value of the page scheme background color, for example: #ffa500 |
|
Returns the permission the current user has on the page, for example: oracle.webcenter.page.model.security.CustomPagePermission |
|
A string of 60 or so characters that uniquely identifies the current page to the security system, for example: oracle_webcenter_page_scopedMD_s8bba98ff_4cbb_40b8_beee_296c916a23ed_user_Umonty_Page4PageDef |
|
Returns true if current page is in Composer mode. Returns false if current page is not in Composer mode |
|
Returns the display name of the layout currently used by the page |
|
Returns the layout view id used by the page |
|
Returns the CSS file used by the layout |
A.4 ELs Related to Specific Portals
The following table lists EL expressions relevant to portals and describes the types of functionality each provides.
Note:
The portal internal name is the name specified for Portal URL on the Overview page of a portal's administration settings. The portal display name is the name specified for Name. Many of the EL expressions in the following table call for the portal internal name.
Table A-3 EL Expressions Relevant to Specific Portals
Expression | Function |
---|---|
|
An The value of this expression is whatever is returned on invoking the java API: |
|
An The value of this expression is whatever is returned on invoking the Java API: |
|
The name of the portal associated with the current web request. If the current web request is in the Home portal context, it returns a value of The value of this expression is whatever is returned on invoking the java API: |
|
An The value of this expression is whatever is returned in Java on invoking |
|
The MDS path of the portal metadata document for the portal with specified name The value of this expression is whatever is returned in java on invoking |
|
An The value of this expression is whatever is returned in java on invoking |
|
The display name of the portal that is named |
|
The URL of the portal that is named |
|
A URL to the icon associated with the portal that is named |
|
The description of the portal that is named |
|
A java.util.Calendar object representing the date-time on which the portal with specified name |
|
The user-name of the person who created the portal that is named |
|
A comma-delimited list of searchable keywords associated with the portal with the name |
|
Boolean value that indicates whether the portal that is named |
|
Boolean value that indicates whether the portal that is named |
|
Boolean value that indicates whether users are allowed to register themselves with the portal that is named |
|
Boolean value that indicates whether users can discover the existence of the portal that is named |
|
Boolean value indicating whether the portal that is named |
|
The email address of the mailing list associated with the portal that is named |
|
The value of a specific custom attribute of the name Note: If you use this EL to provide a value for a field in WebCenter Portal Administration, clicking the Test button may return a blank value. However, the value will resolve correctly in the running portal. |
|
Returns the logo URL for the portal named |
|
A means of querying a portal using a query parameter in the form of If For example, the following EL expression returns a list of all discoverable portals. #{spaceContext.spacesQuery.unionOf['DISCOVERABLE'].listSpaces} If For example, the following EL expression returns an instance of type #{spaceContext.spacesQuery.unionOf['DISCOVERABLE']} |
|
Returns a list of all portals of which the current user is a member To see an example, refer to Example: Using EL Expressions for Various Portals. |
|
Returns a list of all portals of which the current user is a member This EL also returns all the subportals under each of the parent portals to which the current user has access. |
|
Returns portals sorted into the order specified by the sort criteria For example, the following query returns a list of portals to which the user has access sorted by Note that in the following example, the identifier #{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].sort['sp.discoverable']['asc']['sp.lastUpdateDate']['desc'].listSpaces} |
|
Allows specifying the page number (0-based) to select from the results matching the query criteria For example, the following expression returns a list of all portals to which a user has access and returns the third page of the result set: #{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].pageNumber[2].listSpaces]} |
|
Allows specifying the number of results to be included in each page when breaking down the result portal into pages For example, the following expression returns a list of all portals to which a user has access, listing 10 records per page. #{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].pageNumber[10].listSpaces]} |
|
Returns a list of all portals a user has access which are created by a specified user, and on which self subscription is enabled. For more information, see |
|
Returns color code used by portal in the portal browser |
|
Returns the acronym used by the portal in the portal browser |
A.4.1 Example: Using EL Expressions for Various Portals
This section provides an example of using EL expressions to query various portals.
In this example, you will use the following EL to display a list of all portals of which you are a member:
"#{spaceContext.spacesQuery.unionOf['USER_JOINED'].shape['ROOT_LEVEL'].listSpaces}"
You will also use the following methods to display the logo, name, description, and number of members of a portal.
-
displayName
- to display the portal name -
description
- to display the portal description -
memberCount
- to display the number of portal members
To query a portal:
-
Create a new task flow, and mark it as available for use, as described in Working with Task Flows in Building Portals with Oracle WebCenter Portal.
-
Edit the source code of the task flow. On the Assets tab, select the task flow. From the Actions menu, select Edit Source.
-
In the Edit Source dialog, on the Fragment tab, replace the existing code with the following code:
<?xml version='1.0' encoding='UTF-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:pe="http://xmlns.oracle.com/adf/pageeditor" xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions"> <af:panelGroupLayout id="pgl1"> <cust:panelCustomizable id="pc1"> <table border="0" width="100%"> <af:iterator id="it1" var="row" value="#{spaceContext.spacesQuery.unionOf['USER_JOINED'].shape['ROOT_LEVEL'].listSpaces}"> <c:set var="displayName" value="#{row.displayName}"/> <c:set var="description" value="#{row.description}"/> <c:set var="numMembers" value="#{row.memberCount}"/> <tr class="PortletText1"> <af:image id="img1" source="#{WCPrepareImageURL[spaceContext.space[row.name].metadata.icon]}/ICON16"/> </td> <td> <af:outputText id="otCol1" value="#{displayName}" inlineStyle="color:#333333; font-size:12px; font-weight:bold;"/> </td> </tr> <tr> <td> <af:outputText id="otCol3" value="#{description}" inlineStyle="color:#666666; font-size:12px;"/> </td> </tr> <tr> <td> <af:outputText id="otCol4" value="members (#{numMembers}) -" inlineStyle="color:#666666; font-size:10px;"/> <af:spacer id="spacer1" width="5px"/> <af:goLink id="gl1" destination="/spaces/#{row.name}" targetFrame="_blank" text="view"/> </td> </tr> </af:iterator> </table> </cust:panelCustomizable> </af:panelGroupLayout> </jsp:root>
-
Add the task flow to a page. In the resource catalog, the custom task flow is available under UI Components > Task Flows.
The page should now show a list of all the portals of which you are is a member.
A.5 ELs Related to Portal Event Contexts
The following table lists EL expressions relevant to the types of portal events that can trigger the passing of payloads (rather than events relevant to the events feature).
You can access all or part of the event payloads provided in Table A-4 once they have been raised.
For example, for the whole payload, use the following EL:
#{wcEventContext.events.eventName}
For example:
#{wcEventContext.events.WebCenterUserSelected}
All of the payloads for the ELs in Table A-4 are Maps. To dereference a map entry, use the standard EL for Maps:
#{wcEventContext.events.WebCenterUserSelected.UserName}
See Also:
For more information about event wiring, see Wiring Pages, Task Flows, Portlets, and ADF Components in Building Portals with Oracle WebCenter Portal.
Table A-4 EL Expressions Relevant to Event Contexts
Expression | Function |
---|---|
Event Context #{wcEventContext.events.WebCenterResourceSelected} Document Name #{wcEventContext.events.WebCenterResourceSelected.name} Document Creator #{wcEventContext.events.WebCenterResourceSelected.createdBy} Document Last Modified By #{wcEventContext.events.WebCenterResourceSelected.lastModifiedBy} |
Use in context wiring between producer and consumer task flows. Returns a map that relates some piece of metadata from the producer to some piece of metadata from the consumer, for example, from a document creator to the creator's Profile. Producer task flows include:
Consumer task flows include:
|
Event Context #{wcEventContext.events.WebCenterUserSelected} User Name #{wcEventContext.events.WebCenterUserSelected.userName} User GUID #{wcEventContext.events.WebCenterUserSelected.userGUID} Portal Name #{wcEventContext.events.WebCenterUserSelected. Portal GUID #{wcEventContext.events.WebCenterUserSelected. |
Use in context wiring between producer and consumer task flows. Returns a map that relates some piece of metadata from the producer to some piece of metadata from the consumer, for example, from a user to the user's connections. Producer task flows include:
Consumer task flows include:
|
Event Context #{wcEventContext.events.WebCenterConnectionSelected} Profile User Name #{wcEventContext.events.WebCenterConnectionSelected.profileUserName} Profile User GUID #{wcEventContext.events.WebCenterConnectionSelected.profileUserGUID} Connected User Name #{wcEventContext.events.WebCenterConnectionSelected.userName} Connected User GUID #{wcEventContext.events.WebCenterConnectionSelected.userGUID} |
-- |
|
Returns the name of the selected portal |
|
Returns the GUID of the selected portal |
A.6 ELs Related to Assets
Use the expressions in this section to query for assets. Querying for an asset 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
']['like']['
value
']
, where property
is the name of the property, for example, id
, resourceScope
, and so on, 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 asset. When no matching asset is found, null is returned. -
resultList
—Returns a list of assets. When no matching assets are found, an empty list is returned.
Note:
Occurrences of singleResult
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 page template asset found with a display name that contains myPage
:
#{srmContext[wCond['resourceType']['like']['siteTemplate']]['and'][wCond['displayName']['like']['myPage']].singleResult}
The following example returns a list of page template assets residing in the directory resourceDir
, with a description that contains sampleDesc
:
#{srmContext[wCond['resourceType']['like']['siteTemplate']]['and'][wCond['description']['like']['sampleDesc']]['and'][wCond['contentDirectory']['like']['resourceDir'].resultList}
A property of this class includes any attribute of this class. Example properties include: Id
, DisplayName
, iconURI
, contentDirectory
, and so on.
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[wCond['id']['like']['resourceId']].singleResult} #{srmContext[wCond['id']['like']['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[wCond['resourceScope']['like']['scopeName']]['and'][wCond['id]['like']['resourceId']].singleResult} #{srmContext[wCond['id']['like']['resourceId']]['and'][wCond['resourceScope']['like']['scopeName']].singleResult}
The following table lists EL expressions relevant to assets and describes the types of functionality each provides.
Table A-5 ELs Relevant to Assets
EL | Function |
---|---|
|
Returns the asset with the specified ID |
|
Returns any assets with the specified display name |
|
Returns any assets with the specified display name key |
|
Returns one result of an asset that contains the specified value in its description To get multiple results, use |
|
Returns one result of an asset with the specified description key The description key is the key in the To get multiple results, use |
|
Returns any asset with the specified creation date |
|
Returns any asset that was last modified by the user with the specified user name |
|
Returns any asset that was last modified by the specified date |
|
Returns any asset that falls within the specified scope |
|
Returns any asset that falls within the specified category For example:
List of possible category names includes: |
|
Returns any asset that is stored within the specified directory |
|
Returns asset metadata from the specified metadata file For example, the following expression returns asset metadata from the following file
|
|
Returns any For example, the following expression returns the
|
|
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 asset the either does or does not use custom security Set
|
|
In a larger expression, returns any asset that is or is not seeded, depending on the provided value Set
|
|
In a larger expression, returns any asset that is of the specified type of visibility Set
|
|
In a larger expression, returns one or multiple assets with visibility set to either |
|
In a larger expression, returns any asset created by the specified user |
|
In a larger expression, returns one or multiple assets of the specified type For example, the following expression searches for an asset of the type
Note that all asset types are listed in Oracle WebCenter Portal Java API Reference, in the |
|
In a larger expression, returns one or multiple assets available in the application of the specified version |
|
In a larger expression, returns one or multiple assets available in the specified scope For example, the following expression searches for assets in the scope (in this instance, the portal)
To search in the default scope, that is, the application scope, use |
|
In a larger expression, returns one or multiple assets that contain or equal the values set by other included expressions Set |
A.6.1 Example: Using EL Expressions for Assets
This section provides an example of using an EL expression to display a page template based on a user's role.
In this example, you will use an EL expression to enable a specific page template to be displayed for portal managers so that only they can access the features or links available in that page template.
To display a page template based on a user role:
-
Go to the desired portal's administration settings.
-
On the Settings page, under Assets , for Page Template click the Advanced Edit Options icon next to the Page Template drop-down list, and then select Expression Builder to open the editor.
-
In the Type a value or expression, enter the following expression:
#{srmContext[wCond['resourceType']['like']['siteTemplate']][wCond['displayName']['like'][WCSecurityContext.userInScopedRole['Moderator'] ? 'Fusion Side Navigation' : 'WebCenter Portal Top Navigation']].singleResult.id}
Where:
-
srmContext[wCond['resourceType']['like']['siteTemplate']]
Gets a list of all page templates in the scope
-
[wCond['displayName']['like'][WCSecurityContext.userInScopedRole['Moderator'] ? 'Fusion Side Navigation' : 'WebCenter Portal Top Navigation']]
Reduces the list down to one depending on whether the current user is a portal manager. If the user is a portal manager, the Fusion Side Navigation page template is applied. For all other user roles, the portal is rendered using the WebCenter Portal Top Navigation page template.
-
singleResult.id
Returns the GUID of the required entry.
-
-
Click OK.
A.7 ELs Related to Security
The following table lists EL expressions relevant to application security and describes the types of functionality they provide.
Table A-6 EL Expressions Relevant to Security
Expression | Function |
---|---|
|
Returns |
|
Returns the user name of the currently logged in user. If the current user is not logged in, this expression returns no value. |
|
Returns the value |
|
Returns the value true if the current user is assigned the specified group, for example: #{WCSecurityContext.userInGroup['Administrators']} |
|
Returns the value true if the current user is the Portal Manager of the current portal. |
|
Returns the value true if the current user is assigned the specified role in the current scope. Role can be The scope is implicitly resolved to be the current scope. If you use this EL in the home portal, it resolves to the home portal’s GUID and roles defined at the application level. If you use this EL in a portal scope, it resolves to roles defined for the portal. |
A.8 ELs Related to General Settings
The following table lists EL expressions relevant to general application settings and describes the types of functionality they provide.
Table A-7 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 |
|
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. |
A.9 ELs Related to Portal Resources
Use the expressions in this section to query for portal resources. Querying for a portal 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 so on, 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 portal resource. When no matching resource is found, null is returned. -
resultList
—Returns a list of portal resources. When no matching portal resources are found, an empty list is returned.
Note:
Occurrences of singleResult
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 page template portal resource found with a display name that contains myPage
:
#{srmContext.resourceType['siteTemplate'].displayName['myPage'].singleResult}
The following example returns a list of page template portal 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 so on.
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 A-8 lists EL expressions relevant to portal resources and describes the types of functionality each provides. Many of the expressions in Table A-8 are building blocks for narrowing down the portal 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 portal resource-related ELs to form a single query that returns a particular portal template. It retrieves the template storesMasterTemplate
from the parent portal stores
:
#{srmContext.resourceScope['stores'].resourceType['siteTemplate'].displayName['storesMasterTemplate'].singleResult}
For information about EL expressions relevant only to WebCenter Portal assets, see ELs Related to Assets.
Table A-8 ELs Relevant to Portal Resources
EL | Function |
---|---|
|
Returns the portal resource with the specified ID |
|
Returns any portal resources with the specified display name |
|
Returns any portal resources with the specified display name key |
|
Returns one result of a portal resource that contains the specified value in its description To get multiple results, use |
|
Returns one result of a portal resource with the specified description key The description key is the key in the To get multiple results, use |
|
Returns any portal resource with the specified creation date |
|
Returns any portal resource that was last modified by the user with the specified user name |
|
Returns any portal resource that was last modified by the specified date |
|
Returns any portal resource that falls within the specified scope |
|
Returns any portal resource that falls within the specified category For example: #{srmContext.category['siteTemplates']} |
|
Returns any portal resource that is stored within the specified directory |
|
Returns portal 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 portal resources except those available in the excluded scopes |
|
In a larger expression, returns any portal resource that either does or does not use custom security Set
|
|
In a larger expression, returns any portal resource that is or is not seeded, depending on the provided value Set #{srmContext.seeded['TRUE']} |
|
In a larger expression, returns any portal resource that is of the specified type of visibility Set #{srmContext.visibleType['TRUE']} |
|
In a larger expression, returns one or multiple portal resources with visibility set to either |
|
In a larger expression, returns any portal resource created by the specified user |
|
In a larger expression, returns one or multiple portal resources of the specified type For example, the following expression searches for a portal resource of the type #{srmContext.resourceType['SITE_TEMPLATE']} Note that all resource types are listed in Oracle WebCenter Portal Java API Reference, in the |
|
In a larger expression, returns one or multiple portal resources available in the application of the specified version |
|
In a larger expression, returns one or multiple portal resources available in the specified scope For example, the following expression searches for portal resources in the scope (in this instance, the portal) #{srmContext.resourceScope['MyPortal']} To search in the default scope, that is, the application scope, use |
|
In a larger expression, returns one or multiple portal resources that contain or equal the values set by other included expressions Set |
A.10 ELs Related to Navigation
The following table lists EL expressions relevant to application navigation and describes the types of functionality they provide.
Table A-9 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) 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: #{navigationContext.processAction}. |
|
This EL has been deprecated. Use |
|
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 portal 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. |
|
Returns the value of the specified property of the navigation model, where |
Navigation Portal Resource Expressions |
|
|
Returns the value of the specified attribute of the navigation portal resource. |
|
Returns the value of the specified parameter of the navigation portal resource. |
|
Returns the raw value of the specified parameter of the navigation portal resource (before it is evaluated). |
|
Returns the title of the navigation portal resource. |
|
Returns the path to the navigation portal resource. |
|
Returns the URL for the navigation portal resource of type |
|
Returns the identifying path for this navigation portal 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 portal 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 portal resource is a separator item. |
|
Returns whether it is possible to navigate to this portal resource. |
|
Returns whether this portal resource is currently selected. |
|
Returns whether the portal resource is the currently selected portal 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 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 |
#{node. |
Returns the value of the specified property of the navigation portal resource, where |
A.11 ELs Related to Tools and Services
This section lists EL expressions relevant to tools and services and describes the types of functionality they provide.
Table A-10 EL Expressions Relevant to Tools and Services
Expression | Function |
---|---|
|
Returns an implementation of #{webcenterService['oracle.webcenter.doclib']} For service IDs, see Table A-11. |
|
Returns a Boolean value that indicates whether the WebCenter Portal tool or service represented by the service ID For service IDs, see Table A-11. |
The following table lists service IDs associated with WebCenter Portal tool and services.
Table A-11 Service and Tool IDs
Service/Tool | ID |
---|---|
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 |
RSS |
oracle.webcenter.rss |
Search |
oracle.webcenter.search |
Tags |
oracle.webcenter.tagging |
Blogs |
oracle.webcenter.blog |
Worklist |
oracle.webcenter.worklist |
A.12 ELs Related to Composer
The following table lists EL expressions relevant to Composer.
Expression | Function |
---|---|
#{composerContext.inEditMode} |
Determines whether the current page is in View mode or Edit mode. For example:
This example shows an ADF Faces |
#{changeModeBean.inEditMode} |
The For example:
There is a performance impact by setting the |
Example A-1 Example: Using EL Expressions for Composer
This section provides an example of using an EL expression to display different pages in View mode and Edit mode. Consider that you want one of your pages, Page1
, to display another page, Page2
, in View mode. However, while editing Page1
, instead of Page2
, you want to display a website, www.example.com
. You can use the EL of the following format:
#{ composerContext.inEditMode ? 'http://www.example.com' : 'url_of_Page2' }
This EL displays the specified website when your page is in Edit mode, and shows Page2
when in View mode.
The following steps demonstrate how to display different pages depending on the page mode.
-
Open a page named
Page1
in the page editor (Composer). -
In Design view, in the resource catalog, click Web Development.
-
Click Add displayed next to Web Page.
-
Click the Edit icon for the newly added Web Page.
-
In the Component Properties dialog, on the Display Options tab, in the Source field, enter the value as per the following format:
#{ composerContext.inEditMode ? 'website_url' : 'url_of_Page2' }
-
Click OK.
In Composer,
Page1
should now display the website you specified. Save and close the page.Page1
should now showPage2
.
A.13 ELs Related to Documents
The following table lists EL expressions relevant to documents and describes the types of functionality they provide.
Table A-12 EL Expressions Relevant to Documents
Expression | Function |
---|---|
|
Gets the default content repository connection name. Returns |
|
Checks whether the documents feature is configured. Returns |
A.14 ELs Related to People Connections
The following table lists EL expressions relevant to the people connections Profile feature and describes the types of functionality they provide.
Note:
The entry securityContext.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. Information is also returned only if the current user is allowed to see it.
Table A-13 EL Expressions Relevant to People Connections (Profile)
Expression | Function |
---|---|
|
The display name of the user's manager. This value is associated with the LDAP
attribute, |
|
The user's employee number. This value is associated with the LDAP attribute,
|
|
The post office box number associated with the user. This value is associated with
the LDAP attribute, |
|
The time zone in which the user's home office is located. This value is associated
with the LDAP attribute, |
|
A description of the user (from Profile "About Me"). This value is associated with
the LDAP attribute, |
|
The department to which the user belongs. This value is associated with the LDAP
attribute, |
|
The user's business pager number. This value is associated with the LDAP attribute,
|
|
The city in which the user is located. This value is associated with the LDAP
attribute, |
|
The user's surname or last name before marriage. This value is associated with the
LDAP attribute, |
|
The user's business fax number. This value is associated with the LDAP attribute,
|
|
The user's date of hire. This value is associated with the LDAP attribute,
|
|
The user's middle name. This value is associated with the LDAP attribute,
|
|
The user's home phone number. This value is associated with the LDAP attribute,
|
|
The user's employee type classification, for example, |
|
The user's surname or last name. This value is associated with the LDAP attribute,
|
|
The user's birthday. This value is associated with the LDAP attribute,
|
|
The state in which the user's home office is located. This value is associated with
the LDAP attribute, |
|
The user's home street address. This value is associated with the LDAP attribute,
|
|
The street on which the user's home office is located. This value is associated with
the LDAP attribute, |
|
The user's postal or ZIP code. This value is associated with the LDAP attribute,
|
|
The user's initials. This value is associated with the LDAP attribute,
|
|
The user's first name. This value is associated with the LDAP attribute,
|
|
The organizational unit to which the user belongs, for example,
|
|
The user's wireless account number. This value is associated with the LDAP
attribute, |
|
The user's business telephone number. This value is associated with the LDAP
attribute, |
|
The country in to which the user is assigned. This value is associated with the LDAP
attribute, |
|
The user's preferred language. This value is associated with the LDAP attribute,
|
|
The user's display name. This value is associated with the LDAP attribute,
|
|
The user's login id. |
|
The user's job title. This value is associated with the LDAP attribute,
|
|
The user's business email address. This value is associated with the LDAP attribute,
|
|
The organization to which the user belongs, for example, |
|
The user's cell or mobile phone number. This value is associated with the LDAP
attribute, |
A.15 EL Expressions Related to the Page Editor
The following table lists EL expressions relevant to the WebCenter Portal page editor. These EL expressions can be used both in portals built with WebCenter Portal and in asset applications built with Oracle JDeveloper.
Table A-14 EL Expressions Relevant to Page Editor
Expression | Function |
---|---|
|
Determines whether the current page is in View mode or Edit mode. For example: <af:outputText id="ot1" value="#{composerContext.inEditMode ne true ? 'View mode' : 'Edit mode'} /> This example shows an ADF Faces |
|
The For example: <af:popup childCreation="#{changeModeBean.inEditMode ? 'immediate' : 'deferred'}" /> There is a performance impact by setting the |
A.15.1 Example: Using EL Expressions for the Page Editor
This section provides an example of using an EL expression to display different pages in View mode and Edit mode. Consider that you want one of your pages, Page1
, to display another page, Page2
, in View mode. However, while editing Page1
, instead of Page2
, you want to display a website, www.example.com
. You can use the EL of the following format :
#{ composerContext.inEditMode ? 'http://www.example.com' : 'url_of_Page2' }
This EL displays the specified website when your page is in Edit mode, and shows Page2
when in View mode.
The following steps demonstrate how to display different pages depending on the page mode.
-
Open a page named
Page1
in the page editor. -
In Design view, in the resource catalog, click Web Development.
-
Click Add displayed next to Web Page.
-
Click the Edit icon for the newly added Web Page.
-
In the Component Properties dialog, on the Display Options tab, in the Source field, enter the value as per the following format:
#{ composerContext.inEditMode ? 'website_url' : 'url_of_Page2' }
-
Click OK.
In Composer,
Page1
should now display the website you specified. Save and close the page.Page1
should now showPage2
.
A.16 EL Expressions Related to Device Settings
This section lists ELs for obtaining information about device settings. For information about device settings, see Administering Device Settings in Administering Oracle WebCenter Portal.
You can use EL expressions to set assets (skins and page templates) targeted to specific devices. For information on using EL with device settings, see Administering Device Settings in Administering Oracle WebCenter Portal.
-
Table A-15 lists EL expressions for obtaining information about device group mappings.
-
Table A-16 lists ELs for obtaining information about devices.
-
Table A-17 lists ELs for obtaining information about skins and page templates associated with device groups.
-
Sample Task Flow Code for Discovering Device Attributespresents sample code that can be used in a task flow for discovering the attributes of the device used to access the portal.
For example, a page designer can use the device's attribute to control the width of the content area of a page by using the following EL:
#{DeviceAgent.device.attributes['display_resolution_width']
Table A-15 EL Expressions Related to Device Agents
Expression | Related Java API | Description |
---|---|---|
|
|
The root entry point to all device settings EL. |
|
|
The device to which the current request is mapped. |
# |
|
A list of device groups to which the current device maps. This operation returns all device groups, whether they are marked as |
|
|
Gets the device group that the incoming request was mapped to for the given portal. This EL can help the administrator diagnose issues about why a page variant is not getting displayed for a particular device. |
Table A-16 EL Expressions Relevant to Devices
Expression | Related Java API | Description |
---|---|---|
|
|
The device to which the current request is mapped. |
|
|
The name of the device. This is a system friendly identifier that can be used for internal linking. |
|
|
The display name of the device. |
|
|
A map of attributes associated with a device - like the screen size, OS version, and so on. For example, the following EL returns the display resolution width that was set when the device was created:
|
Table A-17 EL Expressions Relevant to Device Groups
Expression | Related Java API | Descriptions |
---|---|---|
|
|
The device group to which the current request has been mapped. The typical flow for identifying the appropriate device group is as follows:
|
|
|
The name of the device group. For example:
|
|
|
Returns the GUID of the portal page template associated with this device group object. If the method returns NULL, the default page template setting for the portal is in effect. Note: For information on the resource ELs used to work with the obtained GUID, see ELs Related to Portal Resources. |
|
|
Returns the GUID of the portal skin associated with this device group. If the method returns NULL, the default skin setting for the portal is in effect. Note: For information on the resource ELs used to work with the obtained GUID, see ELs Related to Portal Resources. |
|
|
Returns true if the device group is the default for the current device. Returns false if the device group is not the default for the device. For example, if the default device group is "Desktop Browsers" and you access the portal on an iPad, then the device group will be iPad, but it is not the default device group. In this case, the method returns false. |
|
|
Identifies whether or not this device group has been marked as enabled for the current portal. Note: In this invocation, the device group will always state |
A.16.1 Sample Task Flow Code for Discovering Device Attributes
The example below lists a JSF page fragment that can be used to create a task flow for discovering device attributes. EL is used to return the attributes. The task flow may be useful for troubleshooting situations where the portal is not rendering properly on a device. By discovering the device attributes, you can take action to correct the rendering problem. Figure A-3 shows output from a task flow created with this sample code.
Example: Task Flow Code for Discovering Device Attributes
<?xml version='1.0' encoding='UTF-8'?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:pe="http://xmlns.oracle.com/adf/pageeditor" xmlns:cust="http://xmlns.oracle.com/adf/faces/customizable" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <af:panelGroupLayout layout="scroll" id="pgl1"> <cust:panelCustomizable id="pc1"/> <f:facet name="separator"> <af:separator id="s1"/> </f:facet> <af:panelFormLayout id="pfl1"> <af:group id="g1"> <af:panelLabelAndMessage id="it0" label="Current Device" labelStyle="color:#0000ff;font-weight:bold;"/> <af:panelLabelAndMessage id="it1plm" label="Internal Name"> <af:outputText id="it1" value="#{DeviceAgent.device.name}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it2plm" label="Display Name"> <af:outputText id="it2" value="#{DeviceAgent.device.displayName}"/> </af:panelLabelAndMessage> </af:group> <af:group> <af:panelLabelAndMessage id="it01" label="Current Device Group" labelStyle="color:#0000ff;font-weight:bold;"/> <af:panelLabelAndMessage id="it3plm" label="Internal Name"> <af:outputText id="it3" value="#{DeviceAgent.currentScopeDeviceGroup.name}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it4plm" label="Display Name"> <af:outputText id="it4" value="#{DeviceAgent.currentScopeDeviceGroup.displayName}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it5plm" label="PageTemplate"> <af:outputText id="it5" value="#{srmContext.id[DeviceAgent.currentScopeDeviceGroup.portalPageTemplate].singleResult.displayName}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it6plm" label="Skin"> <af:outputText id="it6" value="#{srmContext.id[DeviceAgent.currentScopeDeviceGroup.portalSkin].singleResult.displayName}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it7plm" label="Is Default"> <af:outputText id="it7" value="#{DeviceAgent.currentScopeDeviceGroup.default}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it8plm" label="Is Enabled"> <af:outputText id="it8" value="#{DeviceAgent.currentScopeDeviceGroup.enabled}"/> </af:panelLabelAndMessage> </af:group> <af:group> <af:panelLabelAndMessage id="it9plm" label="Current Browser User Agent" labelStyle="color:#0000ff;font-weight:bold;"> <af:outputText id="it9" value="#{DeviceAgent.userAgent}"/> </af:panelLabelAndMessage> </af:group> <af:group> <af:panelLabelAndMessage id="pt0" label="Page Template Info" labelStyle="color:#0000ff;font-weight:bold;"/> <af:panelLabelAndMessage id="it010plm" label="Expected PageTemplate:GUID"> <af:outputText id="it010" value="#{DeviceAgent.currentScopeDeviceGroup.portalPageTemplate}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it0010plm" label="Expected PageTemplate:Name"> <af:outputText id="it0010" value="#{srmContext.id[DeviceAgent.currentScopeDeviceGroup.portalPageTemplate].singleResult.displayName}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it10plm" label="Current PageTemplate:GUID"> <af:outputText id="it10" value="#{WCAppContext.application.siteTemplatesManager.currentSiteTemplateId}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it10aplm" label="Current PageTemplate:Name"> <af:outputText id="it10a" value="#{srmContext.id[WCAppContext.application.siteTemplatesManager.currentSiteTemplateId].singleResult.displayName}"/> </af:panelLabelAndMessage> </af:group> <af:group> <af:panelLabelAndMessage id="sk0" label="Skin Info" labelStyle="color:#0000ff;font-weight:bold;"/> <af:panelLabelAndMessage id="it0111plm" label="Expected Skin:GUID"> <af:outputText id="it0111" value="#{DeviceAgent.currentScopeDeviceGroup.portalSkin}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it0112plm" label="Expected Skin:Name"> <af:outputText id="it0112" value="#{srmContext.id[DeviceAgent.currentScopeDeviceGroup.portalSkin].singleResult.displayName}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it111plm" label="Current Skin:GUID"> <af:outputText id="it111" value=""/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="it112plm" label="Current Skin:Name"> <af:outputText id="it112" value="#{requestScope['oracle.webcenter.webcenterapp.view.shell.WebCenterShellManager.SHELLHANDLER'].adfFacesSkin}"/> </af:panelLabelAndMessage> </af:group> <af:group> <af:panelLabelAndMessage id="pg0" label="Page Info" labelStyle="color:#0000ff;font-weight:bold;"/> <af:panelLabelAndMessage id="pg10" label="Page Path"> <af:outputText id="pg1" value="#{pageDocBean.pagePath}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="pg20" label="Page Style"> <af:outputText id="pg2" value=""/> </af:panelLabelAndMessage> </af:group> <af:group> <af:panelLabelAndMessage id="ap90" label="Optional Attributes" labelStyle="color:#0000ff;font-weight:bold;"/> <af:panelLabelAndMessage id="ap1opta" label="brand-name"> <af:outputText id="ap1" value="#{DeviceAgent.device.attributes['brand-name']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap2opta" label="device-os"> <af:outputText id="ap2" value="#{DeviceAgent.device.attributes['device-os']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap3opta" label="device-type"> <af:outputText id="ap3" value="#{DeviceAgent.device.attributes['device-type']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap4opta" label="device_default_aspect_ratio"> <af:outputText id="ap4" value="#{DeviceAgent.device.attributes['device_default_aspect_ratio']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap5opta" label="device_os-version"> <af:outputText id="ap5" value="#{DeviceAgent.device.attributes['device_os-version']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap6opta" label="device_preview_css"> <af:outputText id="ap6" value="#{DeviceAgent.device.attributes['device_preview_css']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap7opta" label="device_preview_horizontal_css"> <af:outputText id="ap7" value="#{DeviceAgent.device.attributes['device_preview_horizontal_css']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap8opta" label="device_preview_viewport_css"> <af:outputText id="ap8" value="#{DeviceAgent.device.attributes['device_preview_viewport_css']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap9opta" label="device_preview_viewport_horizontal_css"> <af:outputText id="ap9" value="#{DeviceAgent.device.attributes['device_preview_viewport_horizontal_css']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap10opta" label="device_streaming_flv"> <af:outputText id="ap10" value="#{DeviceAgent.device.attributes['device_streaming_flv']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap11opta" label="device_streaming_preferred_http_protocol"> <af:outputText id="ap11" value="#{DeviceAgent.device.attributes['device_streaming_preferred_http_protocol']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap12opta" label="device_streaming_preferred_protocol"> <af:outputText id="ap12" value="#{DeviceAgent.device.attributes['device_streaming_preferred_protocol']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap13opta" label="device_video_streaming"> <af:outputText id="ap13" value="#{DeviceAgent.device.attributes['device_video_streaming']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap14opta" label="display_orientation_support"> <af:outputText id="ap14" value="#{DeviceAgent.device.attributes['display_orientation_support']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap15opta" label="display_resolution_height"> <af:outputText id="ap15" value="#{DeviceAgent.device.attributes['display_resolution_height']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap16opta" label="display_resolution_width"> <af:outputText id="ap16" value="#{DeviceAgent.device.attributes['display_resolution_width']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap17opta" label="is-wireless_device"> <af:outputText id="ap17" value="#{DeviceAgent.device.attributes['is-wireless_device']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap18opta" label="marketing-name"> <af:outputText id="ap18" value="#{DeviceAgent.device.attributes['marketing-name']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap19opta" label="model-name"> <af:outputText id="ap19" value="#{DeviceAgent.device.attributes['model-name']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap20opta" label="model-version"> <af:outputText id="ap20" value="#{DeviceAgent.device.attributes['model-version']}"/> </af:panelLabelAndMessage> <af:panelLabelAndMessage id="ap21opta" label="icon"> <af:outputText id="ap21" value="#{DeviceAgent.device.attributes['icon']}"/> </af:panelLabelAndMessage> </af:group> </af:panelFormLayout> </af:panelGroupLayout> </jsp:root>
A.17 Utilitarian EL Expressions
The following table lists utilitarian EL expressions and describes the types of functionality they provide.
Table A-18 Utilitarian EL Expressions
Expression | Function |
---|---|
|
Returns the current date in the format specified in the current user's preferences. |
|
Returns a truncation of the string specified as |
|
Both of these expressions return the request locale (that is, the browser locale setting). |
|
Returns the current application skin family. Returns the same value as |
A.18 Built-In Expressions in the Expression Editor
In the Expression Editor, when you select the option Choose a value you can populate the text box in the dialog with a built-in EL expression. Select an expression category, then select the type of information you want the expression to return. Your selection's associated EL appears in the text box at the bottom of the dialog.
Figure A-4 Options Under Choose a value in the Expression Editor

Description of "Figure A-4 Options Under Choose a value in the Expression Editor"
This section is organized into subsections that list and describe the ELs associated with each category.
A.18.1 Application Info Built-In ELs
Application Info built-in EL expressions return values related to Oracle WebCenter Portal. For example, the expression #{WCAppContext.application.applicationConfig.title}
, returns the application name specified on the General page in WebCenter Portal administration.
See Also:
For additional EL expressions related to the application, see ELs Related to WebCenter Portal Information.
Table A-19 lists the built-in EL expressions available under the category Application Info and provides an example of the types of values they return.
Table A-19 Built-In EL Expressions Under Application Info
Option | Expression | Example of Returned Value |
---|---|---|
Current Scope |
|
|
Current Page Template Scope |
|
|
Previously Set Page Template |
|
|
Application |
|
|
Application URL |
|
|
Current WebCenter Portal URI |
|
|
Application Config |
|
|
Application Config Title |
|
|
Application Config Logo |
|
|
Application Config HelpPage |
|
|
Application Config CopyrightMessage CustomValue |
|
|
Application Config Privacy Policy URL |
|
|
Application Config Skin |
|
|
For example, consider that you want a link to appear in all pages of a portal that lets you copy and share the current page's URL. You can add an HTML Markup item to a page template, and add the EL that returns page URL.
These steps demonstrate how to use ELs to retrieve page URLs:
-
Open a custom page template in Edit mode.
-
In Design view, in the resource catalog, click Web Development.
-
Click Add next to HTML Markup.
-
Click the Edit icon for the newly added HTML Markup.
-
In the Component Properties dialog, on the Display Options tab, in the Value field, enter the following EL:
<a href="javascript:{ var returnvalue =prompt( '#{pageDocBean.title} URL','#{WCAppContext.applicationURL}/faces#{WCAppContext.currentWebCenterURI}'); }">Share Link</a>
-
Click OK.
-
Apply the page template to your portal.
A.18.2 Asset Info Built-In ELs
Asset Info built-in EL expressions return values related to WebCenter Portal resources, such as templates, styles, resource catalogs, and so on. For example, the expression #{srmContext.id['
ResourceID
'].singleResult}
, returns the asset with the specified GUID.
See Also:
For additional asset-related EL expressions, see ELs Related to Assets.
Table A-20 lists the built-in EL expressions available under the category Asset Info and provides an example of the types of values each returns.
Table A-20 Built-In EL Expressions Under Asset Info
Option | Expression | Example of Returned Value |
---|---|---|
Asset ID |
|
|
Display Name |
|
See Asset ID for an example of a returned value. |
Description |
|
See Asset ID for an example of a returned value. |
Creation Date |
|
See Asset ID for an example of a returned value. |
Modified By |
|
See Asset ID for an example of a returned value. |
Modified Date |
|
See Asset ID for an example of a returned value. |
Asset Scope |
|
See Asset ID for an example of a returned value. |
A.18.3 Page Info Built-In ELs
Page Info built-in EL expressions return values related to WebCenter Portal pages. For example, the expression #{pageDocBean.createdBy}
, returns the user name of the person who created the current page.
Table A-21 lists the built-in EL expressions available under the category Page Info and provides an example of the types of values each returns.
Table A-21 Built-In EL Expressions Under Page Info
Option | Expression | Example of Returned Value |
---|---|---|
Title |
|
|
Created By |
|
|
Create Date String |
|
|
Last Updated By |
|
|
Last Update Date String |
|
|
Page Path |
|
|
Name |
|
|
UI CSS Style |
|
|
UI Scheme BG Image |
|
|
UI Scheme BG Color String |
|
|
Page Permission |
|
|
Page Security Target |
|
|
A.18.4 Page Parameter Built-In ELs
Page Parameter built-in EL expressions return values related to WebCenter Portal page parameters. The editor lists all parameters that are defined for the current page. If no parameters are defined, the Page Parameter category is not available.
For example, the built-in page style Blog provides five built-in page parameters (see Table A-22). The width
parameters describe the percentage of total width allotted to each column. The show
parameters specify whether a page header and footer are rendered. Any page may have its own custom page parameters.
Whether built-in or custom, available page parameters are exposed in the Expression Editor under the Page Parameter category.
See Also:
For more information about creating and using page parameters, see Adding or Modifying Page Parameters in Building Portals with Oracle WebCenter Portal.
Table A-22 lists the EL expressions available under the Page Parameter category for pages based on the Blog page style. It provides an example of the types of values each parameter returns.
Table A-22 Built-In EL Expressions Under Page Parameter
Option | Expression | Example of Returned Value |
---|---|---|
leftWidth |
|
|
centerWidth |
|
|
rightWidth |
|
|
showHeader |
|
|
showFooter |
|
|
A.18.5 Portal Info Built-In ELs
Portal Info built-in EL expressions return values related to portals (other than the Home portal). For example, the expression #{spaceContext.space}
, returns the name of the current portal.
See Also:
For additional portal-related EL expressions, see ELs Related to Specific Portals.
Table A-23 lists the built-in EL expressions available under the category Portal Info and provides an example of the types of values each returns.
Note:
Use the EL expressions listed in Table A-23only in the context of portals other than the Home portal.
Table A-23 Built-In EL Expressions Under Portal Info
Option | Expression | Example of Returned Value |
---|---|---|
NamedPortal |
|
|
CurrentPortal |
|
|
CurrentPortal Name |
|
|
NamedPortal Metadata Path |
|
|
CurrentPortal Metadata Path |
|
|
NamedPortal Metadata |
|
|
CurrentPortal Metadata |
|
|
NamedPortal Metadata DisplayName |
|
|
CurrentPortal Metadata DisplayName |
|
|
NamedPortal Metadata Icon |
|
|
CurrentPortal Metadata Icon |
|
|
NamedPortal Metadata Description |
|
|
CurrentPortal Metadata Description |
|
|
NamedPortal Metadata CreationDate |
|
java.util.GregorianCalendar[time=1290103432242,areFieldsSet=true,areAllFieldsSet=false,lenient=false,zone=java.util.SimpleTimeZone[id=,offset=-28800000,dstSavings=3600000,useDaylight=false,startYear=0, startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1, YEAR=2010,MONTH=10,WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=18,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=3,SECOND=52,MILLISECOND=242,ZONE_OFFSET=?,DST_OFFSET=?] |
CurrentPortal Metadata CreationDate |
#{spaceContext.currentSpace.metadata.creationDate} |
java.util.GregorianCalendar[time=1290103432242,areFieldsSet=true,areAllFieldsSet=false,lenient=false,zone=java.util.SimpleTimeZone[id=,offset=-28800000,dstSavings=3600000,useDaylight=false,startYear=0, startMode=0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMonth=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2010,MONTH=10, WEEK_OF_YEAR=?,WEEK_OF_MONTH=?,DAY_OF_MONTH=18,DAY_OF_YEAR=?,DAY_OF_WEEK=?,DAY_OF_WEEK_IN_MONTH=?,AM_PM=0,HOUR=10,HOUR_OF_DAY=10,MINUTE=3,SECOND=52,MILLISECOND=242,ZONE_OFFSET=?,DST_OFFSET=?] |
NamedPortal Metadata CreatedBy |
|
|
NamedPortal Metadata Keywords |
|
|
CurrentPortal Metadata Keywords |
|
|
NamedPortal Metadata Offline |
|
|
CurrentPortal Metadata Offline |
|
|
NamedPortal Metadata Closed |
|
|
CurrentPortal Metadata Closed |
|
|
NamedPortal Metadata SelfRegistration |
|
|
CurrentPortal Metadata SelfRegistration |
|
|
NamedPortal Metadata Discoverable |
|
|
CurrentPortal Metadata Discoverable |
|
|
NamedPortal Metadata PublishRSS |
|
|
CurrentPortal Metadata PublishRSS |
|
|
NamedPortal Distribution List |
|
|
CurrentPortal Distribution List |
|
|
NamedPortal Metadata CustomAttributes |
|
Returns the value provided for the named custom attribute Note: If you use this EL to provide a value for a field in WebCenter Portal Administration, clicking the Test button may return a blank value. However, the value will resolve correctly in the running portal. |
CurrentPortal Metadata CustomAttributes |
|
Returns the value provided for the named custom attribute Note: If you use this EL to provide a value for a field in WebCenter Portal Administration, clicking the Test button may return a blank value. However, the value will resolve correctly in the running portal. |
CurrentPortal Metadata Logo |
|
|
CurrentPortal Role - Portal Manager |
|
|
CurrentPortal Role - Participant |
#{WCSecurityContext.userInScopedRole['Participant']} |
false or true, depending whether any users in the current scope are assigned the role Participant |
CurrentPortal Role - Viewer |
#{WCSecurityContext.userInScopedRole['Viewer']} |
false or true, depending whether any users in the current scope are assigned the role Viewer |
CurrentPortal Role - Custom |
|
|
NamedPortal Children |
|
Note: The braces ([]) denote a set. |
CurrentPortal Children |
|
Note: The braces ([]) denote a set. |
NamedPortal Parent |
|
|
CurrentPortal Parent |
|
|
NamedPortal Security Parent |
|
|
CurrentPortal Security Parent |
|
|
All visible root level spaces |
|
|
All children and descendent portals for specified Parent Portal GUID |
|
oracle.webcenter.spaces.query.SpacesQueryParameters@4da22f |
Immediate Subportals for specified Parent Portal name |
|
oracle.webcenter.spaces.query.SpacesQueryParameters@1089971 |
List of Portals matching given Portal Names |
|
|
List of Portals matching given Portal GUID |
|
|
List of Portals sorted based on criteria |
|
|
List of Portals based on search pattern |
|
|
List of Portals with limited page size |
|
|
List of portals matching the where clause |
|
|
A.18.6 Portal Page Info Built-In Paths
Rather than EL expressions, the selections under Portal Page Info are directory paths to different application pages. Use them, for example, to provide navigation information to a specified page.
Table A-24 lists the built-in directory paths available under the category Portal Page Info and provides an example of the types of values each returns. The number of values in the dropdown list depends on the template used and the pages created by users.
Table A-24 Built-In Paths Under Portal Page Info
Option | Path | Destination |
---|---|---|
PortalSiteHome.jspx |
|
Path to the Home page of the current portal |
GroupSpaceDocLibMainView.jspx |
|
Path to the Documents page in the current portal |
ListsMainView.jspx |
|
Path to Lists page in current portal |
EventsMainView.jspx |
|
Path to Events page in current portal |
GroupSpaceActivityStreamMainView.jspx |
|
Path to Activity Stream page in current portal |
A.18.7 System Built-In ELs
System built-in EL expressions return values related to system settings, such as the user name of the current user or the current user's specified locale. For example, the expression #{securityContext.userName}
, returns the name of the currently logged in user. For example, if user j.doe is viewing a page where this expression is used, the returned value in j.doe's view is j.doe
. If user j.smith is looking at the same page, the value returned in j.smith's view is j.smith
.
See Also:
For additional utilitarian EL expressions, see Utilitarian EL Expressions.
Table A-25 lists the built-in EL expressions available under the category System and provides an example of the types of values each returns.
Table A-25 Built-In EL Expressions Under System
Option | Expression | Example of Returned Value |
---|---|---|
User |
|
The current user's user name |
Locale |
|
The current user's specified locale This may be taken from application or portal-level settings or user Preferences, whichever is taking precedence. For example: en_US |
A.18.8 User Info Built-In ELs
User Info built-in EL expressions return values related to a given user's Profile. For example, the expression #{webCenterProfile[securityContext.userName].description}
, returns the content of the About Me attribute of the current user's Profile.
See Also:
For additional user-related expressions, see ELs Related to People Connections.
Table A-26 lists the built-in EL expressions available under the category User Info and provides an example of the types of values each returns.
Table A-26 Built-In EL Expressions Under User Info
Option | Expression | Example of Returned Value |
---|---|---|
About Me |
|
Returns the content of the About Me attribute of the current user's Profile. This
value is associated with the LDAP attribute,
|
Username |
|
The user name specified in the current user's Profile. The user's login id. |
First Name |
|
The current user's first name. This value is associated with the LDAP attribute,
|
Middle Name |
|
The current user's middle name. This value is associated with the LDAP attribute,
|
Last Name |
|
The current user's last name. This value is associated
with the LDAP attribute, |
Initials used |
|
The current user's initials. This value is associated with the LDAP attribute,
|
Display Name |
|
The current user's display name. This value is associated with the LDAP attribute,
|
|
|
The current user's business email address. This value is associated with the LDAP
attribute, |
Department |
|
The current user's department. This value is associated with the LDAP attribute,
|
Job Title/Designation |
|
The current user's job title or designation. This value is associated with the LDAP
attribute, |
Manager |
|
The current user's manager's display name. This value is associated with the LDAP
attribute, |
Time zone |
|
The time zone associated with the current user. This value is associated with the
LDAP attribute, |
Employee type |
|
The current user's employee type. This value is associated with the LDAP attribute,
|
Employee Number |
|
The current user's employee number. This value is associated with the LDAP attribute,
|
Preferred Language Code |
|
The current user's preferred language. This value is associated with the LDAP
attribute, |
Organization |
|
The company organization to which the current user belongs. This value is associated
with the LDAP attribute, |
Organizational Unit |
|
The unit of the company organization to which the current user belongs. This value is
associated with the LDAP attribute, |
Business Fax |
|
The current user's business fax number. This value is associated with the LDAP
attribute, |
Business Mobile Number |
|
The current user's business mobile or cell phone number. This value is associated
with the LDAP attribute, |
Business Phone |
|
The current user's business phone number. This value is associated with the LDAP
attribute, |
Business Pager Number |
|
The current user's business pager number. This value is associated with the LDAP
attribute, |
Business Street |
|
The street address of the current user's business office. This value is associated
with the LDAP attribute, |
Business City |
|
The city where the current user's business office is located. This value is
associated with the LDAP attribute, |
Business State |
|
The state where the current user's business office is located. This value is
associated with the LDAP attribute, |
Business PO Box |
|
The current user's business Post Office Box number. This value is associated with the
LDAP attribute, |
Business Postal Code |
|
The postal or ZIP code of the current user's business office. This value is
associated with the LDAP attribute, |
Business Country |
|
The country where the current user's business office is located. This value is
associated with the LDAP attribute, |
Home Address |
|
The current user's home address. This value is associated with the LDAP attribute,
|
Home phone |
|
The current user's home phone number. This value is associated with the LDAP
attribute, |
Date of Birth |
|
The current user's date of birth. This value is associated with the LDAP attribute,
|
Maiden Name |
|
The current user's maiden name. This value is associated with the LDAP attribute,
|
Date of hire |
|
The date the current user was hired by the company. This value is associated with the
LDAP attribute, |
Wireless Account Number |
|
The account number for the current user's wireless internet account. This value is
associated with the LDAP attribute,
|
A.18.9 WebCenter Events Built-In ELs
WebCenter Events built-in EL expressions return values related to document-related events, such as the name of the selected document, the document's creator, the date the document was last modified, and so on. For example, the expression #{wcEventContext.events.WebCenterResourceSelected.name}
, returns the name of the currently selected document.
Table A-27 lists the built-in EL expressions available under the category WebCenter Events and provides an example of the types of values each returns.
Table A-27 Built-In EL Expressions Under WebCenter Events
Option | Expression | Example of Returned Value |
---|---|---|
Selected User Name |
|
The user name of the currently selected user |
Selected Document Name |
|
The name of the currently selected document |
Selected Document Creator |
|
The name of the user who created the currently selected document |
Selected Document Last Modified By |
|
The date the selected document was last modified |
A.19 Desupport of Freeform JPQL WHERE and SORT Clauses in Portal Queries
In WebCenter Portal, if you have introduced an EL expression for querying portals based on a JPQL WHERE
clause, you should know that the freeform JPQL WHERE
clause is desupported. Instead, use a structured WHERE
clause. Freeform SORT
clauses are also desupported. Instead, specify sort criteria on a portal query in a structured way.
For example, suppose that you have used the following syntax to form a WHERE
clause on a portal query:
#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].whereClause['sp.keywords like \'forquery%\' and not (sp.discoverable is null or sp.discoverable =\'N\')'].listSpaces}
Going forward, you must use the following syntax to form a WHERE
clause:
#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].where[wCond['sp.keywords']['like']['forquery']['and'][wCond['sp.discoverable'] ['is']['null']['or'][wCond['sp.discoverable']['=']['N']]['not']]].listSpaces}
Where:
-
wCond
is an atomic condition that can be expressed aswCond[
p
][
op
][
v
]
.Where:
-
p
is a portal attribute (a field inWcSpaceHeader
, see the following bullet list). -
op
is one among a restricted set of JPQL comparison operators ('=
', 'like
', '!=
', '<
', '>
', '<=
', '>=
', 'is
'). -
v
is a string whose interpretation depends on the operatorop
.If the operator is
is
,v
can be the string'null'
or'not null'
, and the condition is understood as the attribute being checked for null or not null respectively in JPQL. If the operator is anything else,v
is interpreted as a literal, and the condition is understood to be the attribute being compared with the literal value.
You can use any field defined in
WcSpaceHeader
in theWHERE
clause, including:-
closed
-
createDate
-
createdBy
-
description
-
discoverable
-
displayName
-
keywords
-
icon
-
logo
-
lastUpdateDate
-
selfSubEnabled
-
rssEnabled
-
spaceGuid
-
spaceId
-
spaceOffline
-
spacePublic
-
spacesType
-
spacesUser
-
updatedBy
-
version
-
parentGuid
-
securityParentGuid
-
ancestorPath
-
seeded
-
groupSpaceMemCount
-
-
sp
represents the JPA entity for a portal,WcSpaceHeader
.For example, you can use the following condition to create a filter for all portals created by users having user names starting with
monty
on which self subscription is enabled:sp.createdBy like 'monty%' and not (sp.selfSubEnabled is null or sp.selfSubEnabled ='N')
-
and
,or
,not
(along withwCond
) are types of conditions.Where:
-
and
represents a conjunction of two conditions. You can express a conjunction condition ascond1
['and'][
cond2
]
wherecond1
andcond2
are the expressions for the two conditions being conjoined. -
or
represents a disjunction condition. You can express a disjunction condition ascond1
['or'][
cond2
]
wherecond1
andcond2
are the expressions for the two conditions being disjoined. -
not
represents a negation condition. You can express a negation condition ascond
['not']
wherecond
is the expression for the condition being conjoined.
-
For example, the following EL returns a list of all portals (to which the current user has access) that are created by users having names starting with monty
and on which self subscription is enabled:
#{spaceContext.spacesQuery.unionOf.ALL_QUERIABLE.where[wCond['sp.createdBy'] ['like']['monty%'] ['and'] [wCond['sp.selfSubEnabled']['is']['null'] ['or'] [wCond['sp.selfSubEnabled']['=']['N']] ['not'] ]].listSpaces}
Now imagine that you have used the following syntax to specify SORT
criteria on a portal query:
#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].sortCriteria ['sp.discoverabledesc, sp.keywords'].listSpaces}
Going forward, you must use the following syntax to specify SORT
criteria on a portal query:
#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].sort['sp.discoverable'] ['desc'].sort['sp.keywords']['asc'].listSpaces}
Where:
-
sp
represents the JPA entity for a portal,WcSpaceHeader
(see previous bullet list for fields defined inWcSpaceHeader
). -
desc
andasc
define sort order, descending and ascending, respectively.
For example, the following query returns a list of portals to which the user has access and sorts the result set on the fields discoverable
and lastUpdateDate
.
#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].sort['sp.discoverable'] ['asc'].sort['sp.lastUpdateDate']['desc'].listSpaces}
Oracle strongly recommends that you convert all existing freeform JPQL WHERE
and SORT
clauses to the new syntax.
If for any reason you must retain the existing syntax, your WebCenter Portal administrator must explicitly enable support for freeform JPQL in the webcenter-config.xml.xml
file by setting the following global flag:
oracle.webcenter.spaces.query.DIRECT_JPQL_CLAUSE_SUPPORTED
Note:
The webcenter-config.xml.xml
file is the customization document for webcenter-config.xml
.
Set this flag to true
for continued support of legacy freeform WHERE
and SORT
clauses. When this option is set to true
, WebCenter Portal log files will contain warnings.
To set this flag in webcenter-config.xml.xml
:
-
Export the latest
webcenter-config.xml.xml
from MDS.For example:
exportMetadata(application='webcenter', server='WC_Portal', toLocation='/tmp/mydata',docs='/oracle/webcenter/webcenterapp/metadata/mdssys/cust/site/webcenter/webcenter-config.xml.xml')
-
Open the file in a text editor and modify settings, as required.
For example:
<mds:insert parent="webcenter(xmlns(webcenter=http:// xmlns.oracle.com/webcenter/webcenterapp))/webcenter:custom-attributes" position="last"> <attribute name= "oracle.webcenter.spaces.query.DIRECT_JPQL_CLAUSE_SUPPORTED" xmlns="http://xmlns.oracle.com/webcenter/webcenterapp"> <description/> <type>java.lang.String</type> <value>true</value> <visible/> </attribute> </mds:insert>
-
Save and close
webcenter-config.xml.xml
. -
Import the updated
webcenter-config.xml.xml
file to WebCenter Portal.For example:
importMetadata(application='webcenter', server='WC_Portal', fromLocation='/tmp/mydata', docs='/oracle/webcenter/webcenterapp/metadata/mdssys/cust/site/webcenter/webcenter-config.xml.xml')