A Expression Language Expressions

Learn about the Expression Language (EL) expressions that you can use in portals built with WebCenter Portal.

Topics:

Introduction to Expression Language (EL) Expressions

ELs Related to WebCenter Portal Information

ELs Related to Specific Pages

ELs Related to Specific Portals

ELs Related to Portal Event Contexts

ELs Related to Assets

ELs Related to Security

ELs Related to General Settings

ELs Related to Portal Resources

ELs Related to Navigation

ELs Related to Tools and Services

ELs Related to Documents

ELs Related to People Connections

ELs Related to Impersonation

EL Expressions Related to the Page Editor

EL Expressions Related to Device Settings

Utilitarian EL Expressions

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 follows
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 Oracle Fusion Middleware Developing Web User Interfaces with Oracle ADF Faces.

Figure A-2 Expression Builder Dialog

Description of Figure A-2 follows
Description of "Figure A-2 Expression Builder Dialog"

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.

The Expression Editor is available through the administration and editing screens in WebCenter Portal. You can open the Expression Editor by clicking the Advanced Edit Options icon next to a field, check box or drop-down list, and then clicking Expression Builder .

Figure A-3 Advanced Edit Options Icon Next to a Parameter Value Field and the Resulting Editor

Description of Figure A-3 follows
Description of "Figure A-3 Advanced Edit Options Icon Next to a Parameter Value Field and the Resulting Editor"

See Also:

For information about accessing component properties, see Modifying Components in Oracle Fusion Middleware Building Portals with Oracle WebCenter Portal.

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 select Page Info and then Created By.

    Figure A-4 Options Under Choose a Value in the Expression Builder

    Description of Figure A-4 follows
    Description of "Figure A-4 Options Under Choose a Value in the Expression Builder"

    See Also:

    For information about the EL expressions generated by the selections, see Built-In Expressions in the Expression Editor.

  • 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}

    Figure A-5 Text Box Under Type a value or expression in the Expression Editor

    Description of Figure A-5 follows
    Description of "Figure A-5 Text Box Under Type a value or expression in the Expression Editor"

    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.

    Note:

    Wherever you enter EL on the generic Display Options tab in the Component Properties dialog, the entry is automatically validated. If the EL syntax is invalid, an error appears and the value is neither applied nor saved. Generic display options are listed in the Display Options Properties table in Oracle Fusion Middleware Building Portals with Oracle WebCenter Portal.

    EL validation is not performed on non-generic display options.

Many expressions in the tables in this appendix are building blocks for narrowing down the object or objects 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 asset-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}

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

#{WCAppContext}

An oracle.webcenter.webcenterapp.context.WCApplicationContext object that provides an access point in the current web request for all WebCenter Portal-related information.

#{WCAppContext.currentWebCenterURI}

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

#{WCAppContext.application.applicationConfig}

An oracle.webcenter.webcenterapp.beans.WebCenterType bean with a payload of metadata from WebCenter Portal.

#{WCAppContext.application.applicationConfig.title}

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.

#{WCAppContext.application.applicationConfig.logo}

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.

#{WCAppContext.application.applicationConfig.helpPage}

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.

#{WCAppContext.application.applicationConfig.copyrightMessage.customValue}

If a copyright message was configured through WebCenter Portal Administration settings, this expression returns the application copyright message.

Out of the box, this returns null.

#{WCAppContext.application.applicationConfig.privacyPolicyUrl}

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 http://www.oracle.com/html/privacy.html

#{WCAppContext.application.applicationConfig.skin}

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.

#{requestContext.skinFamily}

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 #{adfFacesContext.skinFamily}.

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

#{pageDocBean.title}

Returns the page display name, for example:

FinanceProject

#{pageDocBean.createdBy}

Returns the user name of the person who created the page, for example:

monty

#{pageDocBean.createDateString}

Returns the date and time the page was created, for example:

2008-11-19T10:18:36

#{pageDocBean.lastUpdatedBy}

Returns the user name of the person who last updated the page, for example:

monty

#{pageDocBean.lastUpdateDateString}

Returns the date and time the page was last updated, for example:

2008-11-19T10:18:36

#{pageDocBean.pagePath}

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

#{pageDocBean.name}

Returns the file name of the page, for example:

Page4.jspx

#{pageDocBean.UICSSStyle}

Returns the name of the style scheme used on the page, for example:

WCSchemeEggShell

#{pageDocBean.UISchemeBGImage}

Returns the directory path and file name of the page scheme background image.

#{pageDocBean.UISchemeBGColorString}

Returns the hexadecimal value of the page scheme background color, for example:

#ffa500

#{pageDocBean.pagePermission}

Returns the permission the current user has on the page, for example:

oracle.webcenter.page.model.security.CustomPagePermission

#{pageDocBean.pageSecurityTarget}

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

#{changeModeBean.inEditMode}

Returns true if current page is in Composer mode. Returns false if current page is not in Composer mode

#{pageDocBean.currentLayout.displayName}

.

Returns the display name of the layout currently used by the page

#{pageDocBean.layoutViewId}

Returns the layout view id used by the page

#{pageDocBean.layoutCssPath}

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

#{spaceContext}

An oracle.webcenter.spaces.context.SpacesContext object that provides an access point in the current web request for all portal-related information.

The value of this expression is whatever is returned on invoking the java API: SpacesContext.getCurrentInstance()

#{spaceContext.spacesManager.allPortals}

Displays all portals that exists in the WebCenter Portal instance.

Example:

#{spaceContext.spacesManager.allPortals}

The following is an example for the EL and shows how to use it along with the navigation EL.

<af:menuBar id="mb1" styleClass="WCPortalTopNavMenu">
    <af:iterator id="it231" 
value="#{spaceContext.spacesManager.allPortals}"
 var="space" varStatus="varstat">
  <af:menu id="dc_menu2" 
contentDelivery="lazy" text="#{space.displayName}"
 shortDesc="${scope}"
 styleClass="WCPortalTopNavMenu">
<af:iterator id="i1" var="item"
  value="#{navigationContext.navigationModel
['modelScope=#{space.navigationMetadataScope},
modelId=portal-default-navigation'].
listModel['startNode=/, includeStartNode=false']}"
 rows="0">
 <c:set var="target" value="${'/portal/'.concat(space.displayName).
concat('/').concat(item.prettyUrl)}"/>
<af:switcher id="s1"
 facetName="#{item.attributes['hasChild'] == 'true' ? 'menuItemFacet' :
 'navItemFacet'}">
 <f:facet name="menuItemFacet">
<af:switcher id="s3"
  facetName="#{item.attributes['hasChild'] == 'true' ? 
'navigationMenuFacet' : 'navigationItemFacet'}">
 <f:facet name="navigationItemFacet">
 <af:link id="li1" text="#{WCTruncator[item.title]['25']}" 
targetFrame="_self"
 destination="${target}" shortDesc="${target}"/>
  </f:facet>
  <f:facet name="navigationMenuFacet">
 < af:menu id="dc_menu2" contentDelivery="lazy" 
text="#{WCTruncator[item.title]['25']}"
shortDesc="#{item.attributes['ToolTip']}" 
styleClass="WCPortalTopNavMenu">
 <af:iterator id="i2" var="subitem" value="#{item.children}" 
rows="0">
  <c:set var="subtarget"
  value="${'/portal/'.concat(space.displayName).concat('/').
concat(subitem.prettyUrl)}"/>
<af:link id="li2" text="#{WCTruncator[subitem.title]['25']}"
 targetFrame="_self"
  destination="${subtarget}" shortDesc="${subtarget}"/>
 </af:iterator>
  </af:menu>
  </f:facet>
  </af:switcher>
  </f:facet>
  <f:facet name="navItemFacet">
  <af:link id="li3" text="#{WCTruncator[item.title]['25']}" 
targetFrame="_self"
 destination="${target}" shortDesc="${target}"/>
 </f:facet>
  </af:switcher>
 </af:iterator>
  </af:menu>
   </af:iterator>
</af:menuBar>

#{spaceContext.currentSpace}

An oracle.webcenter.spaces.Space object that represents the portal associated with the current web request. If the current web request is in the Home portal context, it returns a value of null.

The value of this expression is whatever is returned on invoking the Java API: SpacesContext.getCurrentInstance().getCurrentSpace()

#{spaceContext.currentSpaceName}

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 null.

The value of this expression is whatever is returned on invoking the java API: SpacesContext.getCurrentInstance().getCurrentSpace()

#{spaceContext.space['portalName']}

#{spaceContext.currentSpace}

An oracle.webcenter.spaces.Space object that represents the portal that is named spaceName or the current portal (currentSpace). For example, #{spaceContext.space['FinanceProject']} returns the portal object for the portal called FinanceProject.

The value of this expression is whatever is returned in Java on invoking .getSpace(...) on the current SpacesManager passing in the MDSSession of the current ADFContext.

#{spaceContext.space['portalName'].metadataPath}

#{spaceContext.currentSpace.metadataPath}

The MDS path of the portal metadata document for the portal with specified name portalName or the current portal (currentSpace). For example, #{spaceContext.space['FinanceProject'].metadataPath} evaluates to /oracle/webcenter/space/metadata/spaces/FinanceProject/space.xml

The value of this expression is whatever is returned in java on invoking .getMetadataPath() on the portal object for the portal.

#{spaceContext.space['portalName'].metadata}

#{spaceContext.currentSpace.metadata}

An oracle.webcenter.spaces.beans.SpaceType bean that carries metadata about the portal that is named portalName or the current portal (currentSpace).

The value of this expression is whatever is returned in java on invoking .getMetadata() on the portal object for the portal passing in the MDSSession of the current ADFContext.

#{spaceContext.space['portalName'].metadata.displayName}

#{spaceContext.currentSpace.metadata.displayName}

The display name of the portal that is named portalName or the current portal (currentSpace). For example, if a portal called Web20Portal has the display name web 2.0 Portal, then #{spaceContext.space['Web20Portal'].metadata.displayName} evaluates to web 2.0 Portal.

#{spaceContext.space['portalName'].GSMetadata.groupSpaceURI}

#{spaceContext.currentSpace.GSMetadata.groupSpaceURI}

The URL of the portal that is named portalName or the current portal (currentSpace).

#{WCPrepareImageURL[spaceContext.space['portalName'].metadata.icon]['']}

#{WCPrepareImageURL[spaceContext.currentSpace.metadata.icon]['']}

A URL to the icon associated with the portal that is named portalName or the current portal (currentSpace).

#{spaceContext.space['portalName'].metadata.description}

#{spaceContext.currentSpace.metadata.description}

The description of the portal that is named portalName or the current portal (currentSpace). For example, #{spaceContext.space['FinanceProject'].metadata.description} evaluates to Conglomeration of all teams involved in financial activities.

#{spaceContext.space['portalName'].metadata.creationDate}

#{spaceContext.currentSpace.metadata.creationDate}

A java.util.Calendar object representing the date-time on which the portal with specified name portalName or the current portal (currentSpace) was created.

#{spaceContext.space['portalName'].metadata.createdBy}

#{spaceContext.currentSpace.metadata.createdBy}

The user-name of the person who created the portal that is named portalName or the current portal (currentSpace).

#{spaceContext.space['portalName'].metadata.keywords}

#{spaceContext.currentSpace.metadata.keywords}

A comma-delimited list of searchable keywords associated with the portal with the name portalName or the current portal (currentSpace). For example, if the portal FinanceProject has the keywords finance, project, money, then #{spaceContext.space['FinanceProject'].metadata.keywords} evaluates to finance, project, money.

#{spaceContext.space['portalName'].metadata.offline}

#{spaceContext.currentSpace.metadata.offline}

Boolean value that indicates whether the portal that is named portalName or the current portal (currentSpace) is offline.

#{spaceContext.space['portalName'].metadata.closed}

#{spaceContext.currentSpace.metadata.closed}

Boolean value that indicates whether the portal that is named portalName or the current portal (currentSpace) is closed.

#{spaceContext.space['portalName'].metadata.selfRegistration}

#{spaceContext.currentSpace.metadata.selfRegistration}

Boolean value that indicates whether users are allowed to register themselves with the portal that is named portalName or the current portal (currentSpace).

#{spaceContext.space['portalName'].metadata.discoverable}

#{spaceContext.currentSpace.metadata.discoverable}

Boolean value that indicates whether users can discover the existence of the portal that is named portalName or the current portal (currentSpace) by searching for it or seeing it listed on the My portals page.

#{spaceContext.space['portalName'].metadata.publishRSS}

#{spaceContext.currentSpace.metadata.publishRSS}

Boolean value indicating whether the portal that is named portalName or the current portal (currentSpace) publishes RSS feeds.

#{spaceContext.space['portalName'].distributionList}

#{spaceContext.currentSpace.distributionList}

The email address of the mailing list associated with the portal that is named portalName or the current portal (currentSpace).

#{spaceContext.space['portalName'].metadata.customAttributes['attributeName']}

#{spaceContext.currentSpace.metadata.customAttributes['attributeName']}

The value of a specific custom attribute of the name attributeName for the portal that is named portalName or the current portal (currentSpace). For example, if the FinanceProject portal has a custom attribute called stockPrice with a value of 13.9, then #{spaceContext.space['FinanceProject'].metadata.customAttributes['stockPrice']} evaluates to 13.9.

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.

#{WCPrepareImageURL[spaceContext.space['portalName'].metadata.logo]['']}

#{WCPrepareImageURL[spaceContext.currentSpace.metadata.logo]['']}

Returns the logo URL for the portal named portalName or the current portal (currentSpace).

#{spaceContext.spacesQuery.property['value']}

#{spaceContext.spacesQuery.property['value'].listSpaces}

A means of querying a portal using a query parameter in the form of property['value'], where property means the name of the property, for example, unionOf, shape, and so on; and value means the criteria to use in fetching the list of all portals, discoverable portals, and so on.

If listSpaces is appended to the expression, the query returns the list of portals of type GSMetadata. For more information, see Interface GSMetadata in Oracle WebCenter Portal Java API Reference.

For example, the following EL expression returns a list of all discoverable portals.

#{spaceContext.spacesQuery.unionOf['DISCOVERABLE'].listSpaces}

If listSpaces is not appended to the EL, then the EL evaluates to an object of type SpacesQueryParameter. This object type must be evaluated using SpacesManager.getSpaces(SpacesQueryParameters), which in turn returns a list of portals of type GSMetadata.

For example, the following EL expression returns an instance of type SpacesQueryParameters with all the query conditions populated.

#{spaceContext.spacesQuery.unionOf['DISCOVERABLE']}

#{spaceContext.spacesQuery.unionOf['USER_JOINED'].

shape['ROOT_LEVEL'].listSpaces}

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.

#{spaceContext.spacesQuery.unionOf['USER_JOINED'].

shape['RECURSIVE_FLATTENED'].listSpaces}

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.

#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].sort[

'sortBy field picked from WcSpaceHeader']}

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 discoverable and lastUpdateDate fields.

Note that in the following example, the identifier sp represents the JPA entity for a portal, WcSpaceHeader.

#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].sort['sp.discoverable']['asc']['sp.lastUpdateDate']['desc'].listSpaces}

#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE']

.pageNumber[page_num].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]}

#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].itemsPerPage[

page_num].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]}

#{spaceContext.spacesQuery.unionOf.ALL_QUERIABLE.

where[wCond['sp.createdBy']['like']['monty%']

['and'] [wCond['sp.selfSubEnabled']['is']['null']

['or'] [wCond['sp.selfSubEnabled']['=']['N']] ['not'] ]].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 SpacesQueryParameters and SpacesQueryFilter in Oracle WebCenter Portal Java API Reference.

#{spaceContext.currentSpace.metadata.portalColor}

Returns color code used by portal in the portal browser

#{spaceContext.currentSpace.metadata.acronym}

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:

  1. Create a new task flow, and mark it as available for use, as described in Working with Task Flows in Oracle Fusion Middleware Building Portals with Oracle WebCenter Portal.

  2. Edit the source code of the task flow. On the Assets tab, select the task flow. From the Actions menu, select Edit Source.

  3. 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>
    
  4. 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 Oracle Fusion Middleware 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:

  • Document Manager

  • Recent Documents

  • Document List Viewer

Consumer task flows include:

  • Links (show the items that are linked to the selected document)

  • Profile (view the Profile of the document's author)

  • Activity Stream (view activities related to this document)

  • Tags (tags on this document and a means of accessing the Tag Center)

Event Context

#{wcEventContext.events.WebCenterUserSelected}

User Name

#{wcEventContext.events.WebCenterUserSelected.userName}

User GUID

#{wcEventContext.events.WebCenterUserSelected.userGUID}

Portal Name

#{wcEventContext.events.WebCenterUserSelected.portalName}

Portal GUID

#{wcEventContext.events.WebCenterUserSelected.portalGUID}

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:

  • Connections

  • Portal Members

Consumer task flows include:

  • Connections (show connections of the selected user)

  • Documents task flows (show documents created by the selected user)

  • Activity Stream (view this user's activities)

  • Tags (tags created by this user)

  • Profile (show this user's Profile)

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}

--

#{wcEventContext.events.WebCenterSpaceSelected.SpaceName}

Returns the name of the selected portal

#{wcEventContext.events.WebCenterSpaceSelected.SpaceGUID}

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

#{srmContext[wCond['id']['like']['resourceGUID']]}

Returns the asset with the specified ID

#{srmContext[wCond['displayName']['like']['resourceDisplayName']]}

Returns any assets with the specified display name

#{srmContext[wCond['displayNameKey']['like']['displayNameKey']]}

Returns any assets with the specified display name key

#{srmContext[wCond['description']['like']['resourceDescription']].singleResult}

Returns one result of an asset that contains the specified value in its description

To get multiple results, use resultList in lieu of singleResult.

#{srmContext[wCond['descriptionKey']['like']['descriptionKey']].singleResult}

Returns one result of an asset with the specified description key

The description key is the key in the xsrt file for the asset description.

To get multiple results, use resultList in lieu of singleResult.

#{srmContext[wCond['createdDate']['like']['resourceCreationDate']]}

Returns any asset with the specified creation date

#{srmContext[wCond['modifiedBy']['like']['resourceLastModifiedBy']]

Returns any asset that was last modified by the user with the specified user name

#{srmContext[wCond['modifiedDate']['like']['resourceLastModifiedDate']]}

Returns any asset that was last modified by the specified date

#{srmContext[wCond['resourceScope']['like']['resourceScope']]}

Returns any asset that falls within the specified scope

#{srmContext[wCond['category']['like']['categoryName']]}

Returns any asset that falls within the specified category

For example:

#{srmContext[wCond['category']['like']['siteTemplates']]}

List of possible category names includes: siteTemplate, pageStyle, dataPresenter, contentPresenter, resourceCatalog, taskFlow, dataControl, taskFlowStyle, and skin.

#{srmContext[wCond['contentDirectory']['like']['contentDirectory']]}

Returns any asset that is stored within the specified directory

#{srmContext[wCond['metadataFile']['like']['metadataFileLocation']]}

Returns asset metadata from the specified metadata file

For example, the following expression returns asset metadata from the following file /home/metadata/data.xml:

#{srmContext[wCond['metadataFile']['like']['/home/metadat/data.xml']]}

#{srmContext[wCond['jspx']['like']['jspxFileLocation']]}

Returns any jspx file in the specified location

For example, the following expression returns the page.jspx file:

#{srmContext[wCond['jspx']['like']['/home/web/page.jspx']]}

#{srmContext[wCond['pageDef']['like']['pageDefinition']]}

Returns any jspx file with the specified page definition

#{srmContext[wCond['iconURI']['like']['iconURI']]}

Returns the icon at the specified icon URI

#{srmContext[wCond['excludeFrom']['like']['excludeFromScopes']]}

In a larger expression, returns all specified resources except those available in the excluded scopes

#{srmContext[wCond['usesCustomSecurity']['like']['usesCustomSecurity']]}

In a larger expression, returns any asset the either does or does not use custom security

Set usesCustomSecurity to TRUE or FALSE. For example:

#{srmContext[wCond['usesCustomSecurity']['like']['TRUE']]}

#{srmContext[wCond['seeded']['like']['seeded']]}

In a larger expression, returns any asset that is or is not seeded, depending on the provided value

Set seeded to TRUE or FALSE. For example:

#{srmContext[wCond['seeded']['like']['TRUE']]}

#{srmContext[wCond['visibleType']['like']['visibleType']]}

In a larger expression, returns any asset that is of the specified type of visibility

Set visibleType to TRUE, FALSE, or NEVER to indicate that the asset is never shown. For example, the following expression returns assets that are visible, that is, assets that are set to Show:

#{srmContext[wCond['visibleType']['like']['TRUE']]}

#{srmContext[wCond['visible']['like']['visible']]}

In a larger expression, returns one or multiple assets with visibility set to either TRUE or FALSE

#{srmContext[wCond['createdBy']['like']['resourceCreator']]}

In a larger expression, returns any asset created by the specified user

#{srmContext[wCond['resourceType']['like']['resourceType']]}

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 SITE_TEMPLATE:

#{srmContext[wCond['resourceType']['like']['SITE_TEMPLATE']]}

Note that all asset types are listed in Oracle WebCenter Portal Java API Reference, in the GenericSiteResourceTypes class.

#{srmContext[wCond['version']['like']['version']]}

In a larger expression, returns one or multiple assets available in the application of the specified version

#{srmContext[wCond['resourceScope']['like']['scopeName']]}

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) MyPortal:

#{srmContext[wCond['resourceScope']['like']['MyPortal']]}

To search in the default scope, that is, the application scope, use defaultScope.

#{srmContext[wCond['searchType']['like']['searchType']]}

In a larger expression, returns one or multiple assets that contain or equal the values set by other included expressions

Set searchType to CONTAINS or EQUALS.

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:

  1. Go to the desired portal's administration settings.

  2. 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.

  3. 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.

  4. 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

#{security.authenticated}

Returns true when the current user is authenticated in the context in which the EL is being invoked, otherwise false.

#{securityContext.userName}

Returns the user name of the currently logged in user. If the current user is not logged in, this expression returns no value.

#{WCSecurityContext.currentUser['userName']}

Returns the value true if the current user is the specified user, otherwise false.

#{WCSecurityContext.userInGroup['group']}

Returns the value true if the current user is assigned the specified group, for example:

#{WCSecurityContext.userInGroup['Administrators']}

#{security.pageContextCommunityModerator}

Returns the value true if the current user is the Portal Manager of the current portal.

#{WCSecurityContext.userInScopedRole['role']}

Returns the value true if the current user is assigned the specified role in the current scope. Role can be Moderator (or Portal Manager, which is the display name), or a custom role defined in that scope.

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. All listed ELs apply to both portals built with Oracle WebCenter Portal applications built with JDeveloper.

Table A-7 EL Expressions Relevant to General Settings

Expression Function

#{generalSettings.userTimeZone}

Returns the time zone the current user has selected in application preferences.

#{generalSettings.preferredDateStyle}

Returns the date format the current user has selected in application preferences.

#{generalSettings.preferredDatePattern}

Returns the current user's preferred date format pattern if it has been set, else, returns null.

#{generalSettings.preferredTimeStyle}

Returns the time format the current user has selected in application preferences.

#{generalSettings.preferredTimePattern}

Returns the current user's preferred time format pattern if it has been set, else, returns null.

#{generalSettings.preferredDateTimePattern}

Returns the current user's preferred date and time format pattern if it has been set, else, returns null.

#{generalSettings.preferredAccessibilityMode}

Returns the current user's preferred accessibility mode (either default, inaccessible, or screenReader)

#{generalSettings.preferredSkinName}

The current user's preferred skin name if one is specified, otherwise the default value.

#{generalSettings.formattedCurrentDate}

Returns the current date in the current user's selected locale.

#{generalSettings.formattedCurrentTime}

Returns the current time in the current user's selected locale.

#{generalSettings.formattedCurrentDateTime}

Returns the current date and time in the current user's selected locale.

#{requestContext.skinFamily}

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

#{srmContext.id['resourceGUID']}

Returns the portal resource with the specified ID

#{srmContext.displayName['resourceDisplayName']}

Returns any portal resources with the specified display name

#{srmContext.displayNameKey['displayNameKey']}

Returns any portal resources with the specified display name key

#{srmContext.description['resourceDescription'].singleResult}

Returns one result of a portal resource that contains the specified value in its description

To get multiple results, use resultList in lieu of singleResult.

#{srmContext.descriptionKey[descriptionKey].singleResult}

Returns one result of a portal resource with the specified description key

The description key is the key in the xsrt file for the portal resource description.

To get multiple results, use resultList in lieu of singleResult.

#{srmContext.createdDate['resourceCreationDate']}

Returns any portal resource with the specified creation date

#{srmContext.modifiedBy['resourceLastModifiedBy']}

Returns any portal resource that was last modified by the user with the specified user name

#{srmContext.modifiedDate['resourceLastModifiedDate']}

Returns any portal resource that was last modified by the specified date

#{srmContext.resourceScope['resourceScope']}

Returns any portal resource that falls within the specified scope

#{srmContext.category['categoryName']}

Returns any portal resource that falls within the specified category

For example:

#{srmContext.category['siteTemplates']}

#{srmContext.contentDirectory['contentDirectory']}

Returns any portal resource that is stored within the specified directory

#{srmContext.metadataFile['metadataFileLocation']}

Returns portal resource metadata from the specified metadata file

For example, the following expression returns resource metadata from the following file /home/metadata/data.xml:

#{srmContext.metadataFile['/home/metadat/data.xml']}

#{srmContext.jspx['jspxFileLocation']}

Returns any jspx file in the specified location

For example, the following expression returns the page.jspx file:

#{srmContext.jspx['/home/web/page.jspx']}

#{srmContext.pageDef['pageDefinition']}

Returns any jspx file with the specified page definition

#{srmContext.iconURI['iconURI']}

Returns the icon at the specified icon URI

#{srmContext.excludeFrom['excludeFromScopes']}

In a larger expression, returns all specified portal resources except those available in the excluded scopes

#{srmContext.usesCustomSecurity['usesCustomSecurity']}

In a larger expression, returns any portal resource that either does or does not use custom security

Set usesCustomSecurity to TRUE or FALSE. For example:

#{srmContext.usesCustomSecurity['TRUE']}

#{srmContext.seeded['seeded']}

In a larger expression, returns any portal resource that is or is not seeded, depending on the provided value

Set seeded to TRUE or FALSE. For example:

#{srmContext.seeded['TRUE']}

#{srmContext.visibleType['visibleType']}

In a larger expression, returns any portal resource that is of the specified type of visibility

Set visibleType to TRUE, FALSE, or NEVER to indicate that the portal resource is never shown. For example, the following expression returns portal resources that are visible, that is, portal resources that are set to Show:

#{srmContext.visibleType['TRUE']}

#{srmContext.visible['visible']}

In a larger expression, returns one or multiple portal resources with visibility set to either TRUE or FALSE

#{srmContext.createdBy['resourceCreator']}

In a larger expression, returns any portal resource created by the specified user

#{srmContext.resourceType['resourceType']}

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 SITE_TEMPLATE:

#{srmContext.resourceType['SITE_TEMPLATE']}

Note that all resource types are listed in Oracle WebCenter Portal Java API Reference, in the GenericSiteResourceTypes class.

#{srmContext.version['version']}

In a larger expression, returns one or multiple portal resources available in the application of the specified version

#{srmContext.resourceScope['scopeName']}

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) MyPortal:

#{srmContext.resourceScope['MyPortal']}

To search in the default scope, that is, the application scope, use defaultScope.

#{srmContext.searchType['searchType']}

In a larger expression, returns one or multiple portal resources that contain or equal the values set by other included expressions

Set searchType to CONTAINS or EQUALS.

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

 

#{navigationContext.defaultNavigationModel}

Returns default navigation model. It gets the value from the preference bean. The preference bean gets the value based on the preference setting in adf-config.xml, static value.

The following example returns the specified default tree model:

#{navigationContext.defaultNavigationModel.defaultTreeModel}

You can also use defaultMenuModel and defaultListModel (see next listing).

#{navigationContext.currentNavigationModel}

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 processAction is called.

The following example returns the default tree model for the current navigation model:

#{navigationContext.currentNavigationModel.defaultTreeModel}

You can also use defaultMenuModel and defaultListModel.

See Also: #{navigationContext.processAction}.

#{navigationContext.navigationModel['model_path']}

This EL has been deprecated. Use #{navigationContext.defaultNavigationModel} or #{navigationContext.currentNavigationModel} in its place.

#{navigationContext.processAction}

Returns the default navigation method for binding to UI component's actionListener attribute. This assumes that the target resource to navigate to is passed in through the action UI component's node or path attribute.

The node attribute is typically used for the iterative case; while the path attribute is typically used to create a static link. If both are specified, the node attribute is used. Note that when using the path attribute, you must also specify the model attribute to pass in the navigation model object. If the model attribute is not specified, the current navigation model is used.

Example using the node attribute:

<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 path attribute:

<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>

#{navigationContext.defaultNavigationModel.pages['scope=GUID,includePageStyle=GUID;GUID, excludePageStyle=GUID;GUID']}

Returns all the visible pages that the user has permissions to view in the specified scope. If the scope is not specified, then the pages will be listed from the current portal.

Example:

The following example shows how to list the pages from the current portal. Note that in the example, the scope is not specified.

#{navigationContext.defaultNavigationModel.pages['scope=,includePageStyle=, excludePageStyle=']}

The following example shows how to list the pages from the specified portal.

#{navigationContext.defaultNavigationModel.pages['scope=s8d93111c_afee_4c31_9b0f_ba9f05b54ab8',includePageStyle=gsr1b60e8a7_2e23_48ff_9571_31ede592de08, excludePageStyle=gsre661d408_8d2b_4bc4_83c4_7c043be1be00']}

where

  • scope: The GUID of the portal from which you want to fetch the pages. If the scope is not specified, then the pages will be listed from the current portal.

  • includePageStyle: The GUID  of the page styles. Pages that use the specified page styles are listed. Multiple page style values are allowed and can be separated by ;. If the value is not specified, all the pages that use the specified page style are displayed.

  • excludePageStyle: The GUID of the page styles. Pages that use the specified page styles are removed from the list of visible pages. Multiple page style values are allowed and can be separated by ;. If the value is not specified, all the pages from the current portal are displayed.

Note:

You can find the GUID of a page style by selecting it on the Assets page and choosing Show Properties from the Actions menu.

Navigation Model Expressions

 

#{navigationContext.defaultNavigationModel.defaultTreeModel}

#{navigationContext.defaultNavigationModel.defaultMenuModel}

#{navigationContext.defaultNavigationModel.defaultListModel}

#{navigationContext.defaultNavigationModel.defaultSiteMap}

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 depth is 0.

For defaultSiteMap, it returns the XML for the site map of the navigation based on the default settings.

This expression returns a model of type:

  • ChildPropertyTreeModel—used in <af:tree> component

  • ChildPropertyMenuModel—used in <af:breadcrumbs> or <af:menu> component

  • ListNavigationResource—used in <af:foreach>

#{navigationContext.defaultNavigationModel.treeModel['parameters']}

#{navigationContext.defaultNavigationModel.menuModel['parameters']}

#{navigationContext.defaultNavigationModel.listModel['parameters']}

#{navigationContext.defaultNavigationModel.siteMap['parameters']}

Returns tree/menu/list model based on the specified comma-separated parameters. Available parameters (with default values as examples) are:

  • startNode=/—specify the starting node of the model (do not need "/" prefix unless requesting the root node, for example, home).

  • includeStartNode=true—specify true if you want to include the starting node (for example, the root node above) or false to start from its children.

  • depth=0—defines the initial depth of fetching. "0" means fetch the entire tree, which may take a long time. In which case, use "1" to fetch on demand (when users click the Expand icon).

  • prefetchOnly=false—by default (true), it returns nodes up to the depth level requested initially; deeper level nodes are returned on demand. Use false if you want only the initial sets of nodes. In which case, it does not return deeper nodes later on when requested, even when there are deeper nodes.

For siteMap, the available parameters are startNode and includeStartNode.

Example:

#{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=false,depth=2']}

#{navigationContext.defaultNavigationModel.rootNode}

Returns a root node (of type NavigationResource) of the navigation model.

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>

#{navigationContext.defaultNavigationModel.node['path']}

Returns a node (of type NavigationResource) based on the path specified (you do not need "/" prefix unless you are requesting the root node, for example, '/')

Example:

#{navigationContext.defaultNavigationModel.node['home/page1']}

#{navigationContext.defaultNavigationModel.currentSelection}

Returns currently selected navigation portal resource.

#{navigationContext.defaultNavigationModel.newCurrentSelection['path']}

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, '/'). If successful, returns the newly selected node of type NavigationResource.

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>

#{navigationContext.defaultNavigationModel.attributes.Description}

#{navigationContext.defaultNavigationModel.attributes['Description']}

Returns the value of the specified attribute of the navigation model.

#{navigationContext.defaultNavigationModel.properties['propertyName']}

Returns the value of the specified property of the navigation model, where propertyName is either rootNode or currentSelection.

Navigation Portal Resource Expressions

 

#{node.attributes.Description}

#{node.attributes['Description']}

Returns the value of the specified attribute of the navigation portal resource.

#{node.parameters.StockSymbol}

#{node.parameters['StockSymbol']}

Returns the value of the specified parameter of the navigation portal resource.

#{node.parametersRaw.StockSymbol}

#{node.parametersRaw['StockSymbol']}

Returns the raw value of the specified parameter of the navigation portal resource (before it is evaluated).

#{node.title}

Returns the title of the navigation portal resource.

#{node.path}

Returns the path to the navigation portal resource.

#{node.externalURL}

Returns the URL for the navigation portal resource of type External Link.

#{node.prettyUrl}

Returns the identifying path for this navigation portal resource.

#{node.prettyUrlPath}

#{node.prettyUrlPath[N]}

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 currentSelection is home/company/products/applications, the following EL returns home/company/products:

#{node.prettyUrlPath[3]}

#{node.goLinkPretty Url}

Returns the identifying path for this navigation portal resource suitable for goLink destination

<af:goLink id="pt_gl2" text="#{node.title}"
   destination="#{node.goLinkPrettyUrl}"
   targetFrame="#{node.attributes['Target']}"
   inlineStyle="font-size:small;#{node.selected ?
   'font-weight:bold;' : ''}"/>

#{node.separator ? ... : ...}

Returns whether this portal resource is a separator item.

#{node.navigable ? ... : ...}

Returns whether it is possible to navigate to this portal resource.

#{node.selected ? ... : ...}

Returns whether this portal resource is currently selected.

#{node.currentlySelected ? ... : ...}

Returns whether the portal resource is the currently selected portal resource and the model is the currently selected model.

#{node.onSelectedPath ? ... : ...}

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 home/company/products/applications, the following EL highlights the home tab.

<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>

#{node.leaf ? ... : ...}

Returns whether this resource is a leaf node.

#{node.parent}

Returns the parent node (of type NavigationResource) of this node. For the root node, null is returned.

#{node.ancestors}

Returns the hierarchy list of ancestors of this node (of type NavigationResource) starting with the root node.

For example, assuming the current node is home/company/products/applications, the following ELs return the following values:

  • #{node.ancestors[1]} returns the node for home

  • #{node.ancestors[3]} returns the node for home/company/products

#{node.depth}

Returns the depth of this node from the root node. Root node has a depth of zero.

#{node.siblings}

Returns the list of siblings (of type NavigationResource) of this node (inclusive).

#{node.nextSibling}

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>

#{node.previousSibling}

Returns the previous sibling in the list (of type NavigationResource) of this node.

#{node.index}

Returns the zero-relative index of this node relative to its siblings.

#{node.children}

#{node.children[N].title}

#{node.children[N].children[N].title}

Returns a collection of child resources.

#{node.childCount}

Returns the number of children of this node.

#{node.childByIndex['index']}

Returns the child node (of type NavigationResource) specified by the zero-relative index.

If not found, this returns null.

#{node.childByPath['admin']}

Returns the child node (of type NavigationResource) specified by the path relative to this node.

The path can be deeper than one level and does not need the '/' prefix. If not found, this returns null.

#{node.properties['propertyName']}

Returns the value of the specified property of the navigation portal resource, where propertyName is one of the following: separator, title, prettyUrl, prettyUrlPath, depth, leaf, childCount, navigable, selected, or currentlySelected.

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. All listed ELs apply to portals built with Oracle WebCenter Portal.

Table A-10 EL Expressions Relevant to Tools and Services

Expression Function

#{webcenterService['serviceId']}

Returns an implementation of oracle.webcenter.framework.service.Service object representing the WebCenter Portal tool or service represented by the service ID serviceId.In the example, object of class oracle.webcenter.doclib.internal.spaces.DoclibService is returned:

#{webcenterService['oracle.webcenter.doclib']}

For service IDs, see Table A-11.

#{webcenterService['serviceId'].configured}

Returns a Boolean value that indicates whether the WebCenter Portal tool or service represented by the service ID serviceId is configured for use in the current WebCenter Portal instance. For example, the following EL returns true if discussions can be used in the application, false otherwise:

#{webcenterService['oracle.webcenter.collab.forum'].configured}

For service IDs, see Table A-11.

#{sessionContext['oracle.webcenter.collab.forum'].groupInfo['portalName'].forumId}

Returns the forum ID of the specified portal discussion forum. Enter the portal name in lieu of portalName.

#{sessionContext['oracle.webcenter.collab.forum'].groupInfo['portalName'].categoryId}

Returns the category ID of the specified WebCenter Portal discussion forums. Enter the portal name in lieu of portalName.

Table A-11 lists service IDs associated with WebCenter Portal tool and services.

Table A-11 Service and Tool IDs

Service/Tool 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

Mail

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. These EL expressions can be used both in portals built with Oracle WebCenter Portal applications built with Oracle JDeveloper.

Expression Function

#{composerContext.inEditMode}

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 outputText component that returns View mode when the page is in View mode and Edit mode when the page is in Edit mode.

#{changeModeBean.inEditMode}

The childCreation attribute determines whether the children of popup dialogs can be viewed in Composer. By default, this attribute is set to deferred and users are unable to see the children of popup dialogs. Setting the value to immediate allows users to view the children of popup dialogs.

For example:

<af:popup childCreation="#{changeModeBean.inEditMode   ? 'immediate' : 'deferred'}" />

There is a performance impact by setting the childrenCreation attribute to immediate. If you do not need to use the popup on the page, using the default setting of deferred will avoid the penalty of CPU and memory usage when it is not needed. Note that the popup will be shown non-modally, thus, the application must be able to handle that fact without error.

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.

  1. Open a page named Page1 in the page editor (Composer).

  2. In Design view, in the resource catalog, click Web Development.

  3. Click Add displayed next to Web Page.

  4. Click the Edit icon for the newly added Web Page.

  5. 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' }
    
  6. Click OK.

    In Composer, Page1 should now display the website you specified. Save and close the page. Page1 should now show Page2.

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

#{documentsService.defaultConnectionName}

Gets the default content repository connection name. Returns null if no connection name is defined.

#{documentsService.configured}

Checks whether the documents feature is configured. Returns true if the documents feature is configured, otherwise false.

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

#{webCenterProfile[userName].managerDisplayName}

#{webCenterProfile[securityContext.userName].managerDisplayName}

The display name of the user's manager.

#{webCenterProfile[userName].employeeNumber}

#{webCenterProfile[securityContext.userName].employeeNumber}

The user's employee number.

#{webCenterProfile[userName].businessPOBox}

#{webCenterProfile[securityContext.userName].businessPOBox}

The post office box number associated with the user.

#{webCenterProfile[userName].timeZone}

#{webCenterProfile[securityContext.userName].timeZone}

The time zone in which the user's home office is located.

#{webCenterProfile[userName].description}

#{webCenterProfile[securityContext.userName].description}

A description of the user (from Profile "About Me").

#{webCenterProfile[userName].department}

#{webCenterProfile[securityContext.userName].department}

The department to which the user belongs.

#{webCenterProfile[userName].businessPager}

#{webCenterProfile[securityContext.userName].businessPager}

The user's business pager number.

#{webCenterProfile[userName].businessCity}

#{webCenterProfile[securityContext.userName].businessCity}

The city in which the user is located.

#{webCenterProfile[userName].maidenName}

#{webCenterProfile[securityContext.userName].maidenName}

The user's surname or last name before marriage.

#{webCenterProfile[userName].businessFax}

#{webCenterProfile[securityContext.userName].businessFax}

The user's business fax number.

#{webCenterProfile[userName].dateofHire}

#{webCenterProfile[securityContext.userName].dateofHire}

The user's date of hire.

#{webCenterProfile[userName].nameSuffix}

#{webCenterProfile[securityContext.userName].nameSuffix}

Additional information appended to the user's name, such as Esq., Jr., and so on.

#{webCenterProfile[userName].middleName}

#{webCenterProfile[securityContext.userName].middleName}

The user's middle name.

#{webCenterProfile[userName].homePhone}

#{webCenterProfile[securityContext.userName].homePhone}

The user's home phone number.

#{webCenterProfile[userName].employeeType}

#{webCenterProfile[securityContext.userName].employeeType}

The user's employee type classification, for example, IC4.

#{webCenterProfile[userName].lastName}

#{webCenterProfile[securityContext.userName].lastName}

The user's surname or last name.

#{webCenterProfile[userName].dateofBirth}

#{webCenterProfile[securityContext.userName].dateofBirth}

The user's birthday.

#{webCenterProfile[userName].businessState}

#{webCenterProfile[securityContext.userName].businessState}

The state in which the user's home office is located.

#{webCenterProfile[userName].homeAddress}

#{webCenterProfile[securityContext.userName].homeAddress}

The user's home street address.

#{webCenterProfile[userName].businessStreet}

#{webCenterProfile[securityContext.userName].businessStreet}

The street on which the user's home office is located.

#{webCenterProfile[userName].businessPostalCode}

#{webCenterProfile[securityContext.userName].businessPostalCode}

The user's postal or ZIP code.

#{webCenterProfile[userName].initials}

#{webCenterProfile[securityContext.userName].initials}

The user's initials.

#{webCenterProfile[userName].firstName}

#{webCenterProfile[securityContext.userName].firstName}

The user's first name.

#{webCenterProfile[userName].organizationalUnit}

#{webCenterProfile[securityContext.userName].organizationalUnit}

The organizational unit to which the user belongs, for example, D10,.

#{webCenterProfile[userName].wirelessAcctNumber}

#{webCenterProfile[securityContext.userName].wirelessAcctNumber}

The user's wireless account number.

#{webCenterProfile[userName].businessPhone}

#{webCenterProfile[securityContext.userName].businessPhone}

The user's business telephone number.

#{webCenterProfile[userName].businessCountry}

#{webCenterProfile[securityContext.userName].businessCountry}

The country in to which the user is assigned.

#{webCenterProfile[userName].preferredLanguage}

#{webCenterProfile[securityContext.userName].preferredLanguage}

The user's preferred language.

#{webCenterProfile[userName].displayName}

#{webCenterProfile[securityContext.userName].displayName}

The user's display name.

#{webCenterProfile[userName].userName}

#{webCenterProfile[securityContext.userName].userName}

The user's actual name.

#{webCenterProfile[userName].title}

#{webCenterProfile[securityContext.userName].title}

The user's job title.

#{webCenterProfile[userName].businessEmail}

#{webCenterProfile[securityContext.userName].businessEmail}

The user's business email address.

#{webCenterProfile[userName].organization}

#{webCenterProfile[securityContext.userName].organization}

The organization to which the user belongs, for example, Sales,.

#{webCenterProfile[userName].businessMobile}

#{webCenterProfile[securityContext.userName].businessMobile}

The user's cell or mobile phone number.

#{webCenterProfile[userName].expertise}

#{webCenterProfile[securityContext.userName].expertise}

The user's business expertise.

A.15 ELs Related to Impersonation

The following table lists EL expressions relevant to WebCenter Portal Impersonation and describes the types of functionality they provide. All listed ELs apply to portals built with Oracle WebCenter Portal .

For more information about using these ELs, see Customizing WebCenter Portal Impersonation Security.

Table A-14 EL Expressions Relevant to Impersonation

Expression Function

#{WCSecurityContext.impersonationConfigured}

Returns whether or not impersonation has been enabled for the current domain.

This EL can be useful when determining if an error was caused by an impersonation session ending prematurely, or to provide an additional indicator that a session has ended.

#{WCSecurityContext.userInImpersonationSession}

Returns whether the current user is in an impersonation session or not.

You can use this EL to protect content and render it inaccessible during an impersonation session. For example, you could map the rendered attribute of an administration taskflow on a page to this EL only rendering the taskflow if the user is not viewing the taskflow in an impersonation session.

#{WCSecurityContext.currentImpersonator}

This EL could be used to modify the page template to display the impersonator or render content accessible only to a particular impersonator.

A.16 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-15 EL Expressions Relevant to Page Editor

Expression Function

#{composerContext.inEditMode}

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 outputText component that returns View mode when the page is in View mode and Edit mode when the page is in Edit mode.

#{changeModeBean.inEditMode}

The childCreation attribute determines whether the children of popup dialogs can be viewed in Composer. By default, this attribute is set to deferred and users are unable to see the children of popup dialogs. Setting the value to immediate allows users to view the children of popup dialogs.

For example:

<af:popup childCreation="#{changeModeBean.inEditMode
  ? 'immediate' : 'deferred'}" />

There is a performance impact by setting the childrenCreation attribute to immediate. If you do not need to use the popup on the page, using the default setting of deferred will avoid the penalty of CPU and memory usage when it is not needed. Note that the popup will be shown non-modally, thus, the application must be able to handle that fact without error.

A.16.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.

  1. Open a page named Page1 in the page editor.

  2. In Design view, in the resource catalog, click Web Development.

  3. Click Add displayed next to Web Page.

  4. Click the Edit icon for the newly added Web Page.

  5. 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' }
    
  6. Click OK.

    In Composer, Page1 should now display the website you specified. Save and close the page. Page1 should now show Page2.

A.17 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 Oracle Fusion Middleware 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 Oracle Fusion Middleware Administering Oracle WebCenter Portal.

  • Table A-16 lists EL expressions for obtaining information about device group mappings.

  • Table A-17 lists ELs for obtaining information about devices.

  • Table A-18 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-16 EL Expressions Related to Device Agents

Expression Related Java API Description

#{DeviceAgent}

DeviceAgent.getInstance()

The root entry point to all device settings EL.

#{DeviceAgent.device}

DeviceAgent.getInstance().getDevice()

The device to which the current request is mapped.

#{DeviceAgent.deviceGroups}

DeviceAgent.getInstance().getDeviceGroups()

A list of device groups to which the current device maps. This operation returns all device groups, whether they are marked as enabled or not.

#{DeviceAgent.currentScopeDeviceGroup}

DeviceAgent.getInstance().getCurrentScopeDeviceGroup()

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-17 EL Expressions Relevant to Devices

Expression Related Java API Description

#{DeviceAgent.device}

DeviceAgent.getInstance().getDevice()

The device to which the current request is mapped.

#{DeviceAgent.device.name}

DeviceAgent.getInstance().getDevice().getName()

The name of the device. This is a system friendly identifier that can be used for internal linking.

#{DeviceAgent.device.displayName}

DeviceAgent.getInstance().getDevice().getDisplayName()

The display name of the device.

#{DeviceAgent.device.attributes}

DeviceAgent.getInstance().getDevice().getAttributes()

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:

#{DeviceAgent.device.attributes['display_resolution_width']}

Table A-18 EL Expressions Relevant to Device Groups

Expression Related Java API Descriptions

#{DeviceAgent.currentScopeDeviceGroup}

DeviceAgent.getInstance().getCurrentScopeDeviceGroup()

The device group to which the current request has been mapped. The typical flow for identifying the appropriate device group is as follows:

  1. Identify the device to which the current request belongs.

  2. Get all the device groups that have been enabled for the current portal.

  3. Identify the first device group (from the above list) to which the device belongs.

#{DeviceAgent.currentScopeDeviceGroup.name}

DeviceAgent.getInstance().getCurrentScopeDeviceGroup().getName()

The name of the device group. For example:

#{DeviceAgent.currentScopeDeviceGroup.name =='androidTablets'}

#{DeviceAgent.currentScopeDeviceGroup.portalPageTemplate}

DeviceAgent.getInstance().getCurrentScopeDeviceGroup().getPortalPageTemplate()

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.

#{DeviceAgent.currentScopeDeviceGroup.portalSkin}

DeviceAgent.getInstance().getCurrentScopeDeviceGroup().getPortalSkin()

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.

#{DeviceAgent.currentScopeDeviceGroup.default}

DeviceAgent.getInstance().getCurrentScopeDeviceGroup().isDefault()

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.

#{DeviceAgent.currentScopeDeviceGroup.enabled}

DeviceAgent.getInstance().getCurrentScopeDeviceGroup().isEnabled()

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 true. This EL is useful when working with all the device groups as obtained from the EL #{DeviceAgent.deviceGroups}

A.17.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-6 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>

Figure A-6 Output from Sample Task Flow

Description of Figure A-6 follows
Description of "Figure A-6 Output from Sample Task Flow"

A.18 Utilitarian EL Expressions

The following table lists utilitarian EL expressions and describes the types of functionality they provide.

Table A-19 Utilitarian EL Expressions

Expression Function

#{userPreferences.currentDate}

Returns the current date in the format specified in the current user's preferences.

#{WCTruncator['text']['numberOfChars']}

Returns a truncation of the string specified as text to the number of characters specified as numberOfChars, followed by a trailing ellipsis, for example: #{WCTruncator['abracadabra']['5']} evaluates to abrac...

#{facesContext.viewRoot.locale}

#{facesContext.externalContext.requestLocale}

Both of these expressions return the request locale (that is, the browser locale setting).

#{adfFacesContext.skinFamily}

Returns the current application skin family. Returns the same value as #{requestContext.skinFamily}.

A.19 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-7 Options Under Choose a value in the Expression Editor

Description of Figure A-7 follows
Description of "Figure A-7 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.19.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-20 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-20 Built-In EL Expressions Under Application Info

Option Expression Example of Returned Value

Current Scope

#{serviceCtx.scope}

Scope[name=standards, guid=sa78185d3_9d65_49ab_ac1d_4809380d0b30]

Current Page Template Scope

#{WCAppContext.currentScope}

Scope[name=standards, guid=sa78185d3_9d65_49ab_ac1d_4809380d0b30]

Previously Set Page Template

#{WCAppContext.previouslySetPageTemplate}

Fusion Side Navigation

Application

#{WCAppContext.application}

oracle.webcenter.webcenterapp.internal.view.shell.WCApplication

Application URL

#{WCAppContext.applicationURL}

http://host:port/webcenter

Current WebCenter Portal URI

#{WCAppContext.currentWebCenterURI}

/oracle/webcenter/page/scopedMD/GUID/businessRolePages/Page3.jspx?wc.contextURL=%2Fspaces

Application Config

#{WCAppContext.application.applicationConfig}

oracle.webcenter.webcenterapp.beans.WebCenterMetadataImpl@123db9d

Application Config Title

#{WCAppContext.application.applicationConfig.title}

WebCenter

Application Config Logo

#{WCAppContext.application.applicationConfig.logo}

/oracle/webcenter/webcenterapp/metadata/images/logo.gif

Application Config HelpPage

#{WCAppContext.application.applicationConfig.helpPage}

/webcenterhelp/spaces?topic=welcome_main

Application Config CopyrightMessage CustomValue

#{WCAppContext.application.applicationConfig.copyrightMessage.customValue}

http://www.example.com/html/copyright.html

Application Config Privacy Policy URL

#{WCAppContext.application.applicationConfig.privacyPolicyUrl}

http://www.example.com/html/privacy.html

Application Config Skin

#{WCAppContext.application.applicationConfig.skin}

webcenterfx

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:

  1. Open a custom page template in Edit mode.

  2. In Design view, in the resource catalog, click Web Development.

  3. Click Add next to HTML Markup.

  4. Click the Edit icon for the newly added HTML Markup.

  5. 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>
    
  6. Click OK.

  7. Apply the page template to your portal.

A.19.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-21 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-21 Built-In EL Expressions Under Asset Info

Option Expression Example of Returned Value

Asset ID

#{srmContext[wCond['id']['like']['ResourceID']].singleResult}

id:gsr3396194a_3a72_44d6_90b4_57fd6efe4ff7 resourceScope:Scope[name=defaultScope, guid=s8bba98ff_4cbb_40b8_beee_296c916a23ed] resourceType:siteTemplate serviceId:oracle.webcenter.siteresources.sitetemplate category: displayName:Fusion Side Navigation displayNameKey:SITE_TEMPLATE_FUS_SIDE_STRETCH_NAV_DN description:Stretching Page Layout with Side Navigation. Use Fusion FX Skin. descriptionKey:SITE_TEMPLATE_FUS_SIDE_STRETCH_NAV_DESC contentDirectory:/oracle/webcenter/siteresources/shared metadataFile: jspx:/oracle/webcenter/webcenterapp/view/templates/WCSiteTemplateSideNavStretch.jspx pageDef:/oracle/webcenter/webcenterapp/bindings/pageDefs/oracle_webcenter_webcenterapp_view_templates_WCSiteTemplateSideNavStretchPageDef.xml iconURI: excludeFrom: usesCustomSecurity:false visible:TRUE seeded:true createdBy:system createdDate:Fri Jul 02 05:44:19 PDT 2010 modifiedBy:system resourceBundle:oracle.webcenter.sitetemplate.view.resource.SiteTemplateBundle modifiedDate:Fri Jul 02 05:44:19 PDT 2010 logoUrl:/adf/webcenter/srm_dflt_logo_qualifier.png attributes:[]

Display Name

#{srmContext[wCond['displayName']['like']['DisplayName']].singleResult}

See Asset ID for an example of a returned value.

Description

#{srmContext[wCond['description']['like']['Description']].singleResult}

See Asset ID for an example of a returned value.

Creation Date

#{srmContext[wCond['createdDate']['like']['CreationDate']].singleResult}

See Asset ID for an example of a returned value.

Modified By

#{srmContext[wCond['modifiedBy']['like']['UserName']].singleResult}

See Asset ID for an example of a returned value.

Modified Date

#{srmContext[wCond['modifiedDate']['like']['ModifiedDate']].singleResult}

See Asset ID for an example of a returned value.

Asset Scope

#{srmContext[wCond['resourceScope']['like']['ResourceScope']].singleResult}

See Asset ID for an example of a returned value.

A.19.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-22 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-22 Built-In EL Expressions Under Page Info

Option Expression Example of Returned Value

Title

#{pageDocBean.title}

Welcome Page (BRP)

Created By

#{pageDocBean.createdBy}

j.doe

Create Date String

#{pageDocBean.createDateString}

2010-11-17T13:27:52

Last Updated By

#{pageDocBean.lastUpdatedBy}

j.smith

Last Update Date String

#{pageDocBean.lastUpdateDateString}

2010-11-17T13:27:52

Page Path

#{pageDocBean.pagePath}

/oracle/webcenter/page/scopedMD/GUID/businessRolePages/Page3.jspx

Name

#{pageDocBean.name}

Page3.jspx

UI CSS Style

#{pageDocBean.UICSSStyle}

WCSchemeCustom

UI Scheme BG Image

#{pageDocBean.UISchemeBGImage}

#{facesContext.externalContext.requestContextPath}/adf/oracle/webcenter/page/images/clouds.png

UI Scheme BG Color String

#{pageDocBean.UISchemeBGColorString}

null

Page Permission

#{pageDocBean.pagePermission}

oracle.webcenter.page.model.security.CustomPagePermission

Page Security Target

#{pageDocBean.pageSecurityTarget}

oracle_webcenter_page_scopedMD_sa78185d3_9d65_49ab_ac1d_4809380d0b30_COIHomePageDef

A.19.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-23). 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 Oracle Fusion Middleware Building Portals with Oracle WebCenter Portal.

Table A-23 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-23 Built-In EL Expressions Under Page Parameter

Option Expression Example of Returned Value

leftWidth

#{bindings.leftWidth}

25%

centerWidth

#{bindings.centerWidth}

50%

rightWidth

#{bindings.rightWidth}

25%

showHeader

#{bindings.showHeader}

false

showFooter

#{bindings.showFooter}

false

A.19.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-24 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-24only in the context of portals other than the Home portal.

Table A-24 Built-In EL Expressions Under Portal Info

Option Expression Example of Returned Value

NamedPortal

#{spaceContext.space['portalName']}

oracle.webcenter.spaces.internal.model.SpaceImpl@15fc839

CurrentPortal

#{spaceContext.currentSpace}

oracle.webcenter.spaces.internal.model.SpaceImpl@d5e197

CurrentPortal Name

#{spaceContext.currentSpaceName}

standards

NamedPortal Metadata Path

#{spaceContext.space['portalName'].metadataPath}

/oracle/webcenter/space/metadata/spaces/portalName/space.xml

CurrentPortal Metadata Path

#{spaceContext.currentSpace.metadataPath}

/oracle/webcenter/space/metadata/spaces/standards/space.xml

NamedPortal Metadata

#{spaceContext.space['portalName'].metadata}

oracle.webcenter.spaces.beans.SpaceMetadataImpl@1d7320a

CurrentPortal Metadata

#{spaceContext.currentSpace.metadata}

oracle.webcenter.spaces.beans.SpaceMetadataImpl@1096c64

NamedPortal Metadata DisplayName

#{spaceContext.space['portalName'].metadata.displayName}

Standards

CurrentPortal Metadata DisplayName

#{spaceContext.currentSpace.GSMetadata.displayName}

Sales

NamedPortal Metadata Icon

#{WCPrepareImageURL[spaceContext.space['portalName'].metadata.icon]['']}

/webcenter-spaces-resources/oracle/webcenter/space/metadata/spacetemplate/PortalSite/images/portal_icon.png

CurrentPortal Metadata Icon

#{WCPrepareImageURL[spaceContext.currentSpace.metadata.icon]['']}

/webcenter-spaces-resources/oracle/webcenter/space/metadata/spaces/Test_Space/images/wc_prj_icon.png

NamedPortal Metadata Description

#{spaceContext.space['portalName'].metadata.description}

Central point for all standards, templates, and stylesheets for company collateral

CurrentPortal Metadata Description

#{spaceContext.currentSpace.GSMetadata.description}

Sales Force Team Site

NamedPortal Metadata CreationDate

#{spaceContext.space['portalName'].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

#{spaceContext.space['portalName'].metadata.createdBy}

j.doe

NamedPortal Metadata Keywords

#{spaceContext.space['portalName'].metadata.keywords}

standards templates style sheets collateral

CurrentPortal Metadata Keywords

#{spaceContext.currentSpace.metadata.keywords}

sales salesReports salesNews salesTeam

NamedPortal Metadata Offline

#{spaceContext.space['portalName'].metadata.offline}

false or true, depending on whether the named portal is offline

CurrentPortal Metadata Offline

#{spaceContext.currentSpace.metadata.offline}

false or true, depending on whether the current portal is offline

NamedPortal Metadata Closed

#{spaceContext.space['portalName'].metadata.offline}

false or true, depending on whether the named portal is closed

CurrentPortal Metadata Closed

#{spaceContext.currentSpace.metadata.closed}

false or true, depending on whether the current portal is closed

NamedPortal Metadata SelfRegistration

#{spaceContext.space['portalName'].metadata.selfRegistration}

false or true, depending on whether self registration is enabled for the named portal

CurrentPortal Metadata SelfRegistration

#{spaceContext.currentSpace.metadata.selfRegistration}

false or true, depending on whether self registration is enabled for the current portal

NamedPortal Metadata Discoverable

#{spaceContext.space['portalName'].metadata.discoverable}

false or true, depending on whether the named portal is discoverable

CurrentPortal Metadata Discoverable

#{spaceContext.currentSpace.metadata.discoverable}

false or true, depending on whether the current portal is discoverable

NamedPortal Metadata PublishRSS

#{spaceContext.space['portalName'].metadata.publishRSS}

false or true, depending on whether the named portal can be published in an RSS reader

CurrentPortal Metadata PublishRSS

#{spaceContext.currentSpace.metadata.publishRSS}

false or true, depending on whether the current portal can be published in an RSS reader

NamedPortal Distribution List

#{spaceContext.space['portalName'].distributionList}

standardsGroup@myCompany.com

CurrentPortal Distribution List

#{spaceContext.currentSpace.distributionList}

salesTeam@myCompany.com

NamedPortal Metadata CustomAttributes

#{spaceContext.space['portalName'].metadata.customAttributes['attributeName']}

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

#{spaceContext.currentSpace.metadata.customAttributes['attributeName']}

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

#{WCPrepareImageURL[spaceContext.currentSpace.metadata.logo]['']}

/webcenter-spaces-resources/oracle/webcenter/space/metadata/spacetemplate/PortalSite/images/portal_logo.png

CurrentPortal Role - Portal Manager

#{WCSecurityContext.userInScopedRole['Moderator']}

false or true, depending whether any users in the current scope are assigned the 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

#{WCSecurityContext.userInScopedRole['CustomRole']}

false or true, depending on if any users in the current scope are assigned the named custom role

NamedPortal Children

#{spaceContext.space['portalName'].children}

[oracle.webcenter.spaces.internal.model.SpaceImpl@5705f4, oracle.webcenter.spaces.internal.model.SpaceImpl@147d658]

Note: The braces ([]) denote a set.

CurrentPortal Children

#{spaceContext.currentSpace.children}

[oracle.webcenter.spaces.internal.model.SpaceImpl@5705f4, oracle.webcenter.spaces.internal.model.SpaceImpl@147d658]

Note: The braces ([]) denote a set.

NamedPortal Parent

#{spaceContext.space['portalName'].parent}

oracle.webcenter.spaces.internal.model.SpaceImpl@15fc839

CurrentPortal Parent

#{spaceContext.currentSpace.parent}

oracle.webcenter.spaces.internal.model.SpaceImpl@15fc839

NamedPortal Security Parent

#{spaceContext.space['portalName'].securityParent}

oracle.webcenter.spaces.internal.model.SpaceImpl@1392793

CurrentPortal Security Parent

#{spaceContext.currentSpace.securityParent}

oracle.webcenter.spaces.internal.model.SpaceImpl@1392793

All visible root level spaces

#{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE,DISCOVERABLE,PUBLIC_ACCESSIBLE,ALLUSER_ACCESSIBLE,USER_JOINED,USER_MODERATED'].shape['ROOT_LEVEL']}

oracle.webcenter.spaces.query.SpacesQueryParameters@ae34c8

All children and descendent portals for specified Parent Portal GUID

#{spaceContext.spacesQuery.parentSpaceGuid['portalGuid'].shape['RECURSIVE_FLATTENED']}

oracle.webcenter.spaces.query.SpacesQueryParameters@4da22f

Immediate Subportals for specified Parent Portal name

#{spaceContext.spacesQuery.parentSpaceName['portalGuid'].shape['ROOT_LEVEL']}

oracle.webcenter.spaces.query.SpacesQueryParameters@1089971

List of Portals matching given Portal Names

#{spaceContext.spacesQuery.containingNames['portal1, portal2,portal3']}

oracle.webcenter.spaces.query.SpacesQueryParameters@68e467

List of Portals matching given Portal GUID

#{spaceContext.spacesQuery.containingGuids['portalGuid1, portalGuid2']}

oracle.webcenter.spaces.query.SpacesQueryParameters@1c56009

List of Portals sorted based on criteria

#{spaceContext.spacesQuery.unionOf.ALL_QUERIABLE.sort['sp.lastUpdateDate']['desc']}

oracle.webcenter.spaces.query.SpacesQueryParameters@6c3def

List of Portals based on search pattern

#{spaceContext.spacesQuery.unionOf.ALL_QUERIABLE.search['searchKeyword']}

oracle.webcenter.spaces.query.SpacesQueryParameters@19b2cf3

List of Portals with limited page size

#{spaceContext.spacesQuery.unionOf.USER_JOINED.itemsPerPage[n].pageNumber[n]}

oracle.webcenter.spaces.query.SpacesQueryParameters@4f8818

List of portals matching the where clause

#{spaceContext.spacesQuery.unionOf.USER_JOINED.where[wCond['sp.createdBy']['=']['userName']]}

oracle.webcenter.spaces.query.SpacesQueryParameters@1ba816d

A.19.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-25 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-25 Built-In Paths Under Portal Page Info

Option Path Destination

PortalSiteHome.jspx

/faces/oracle/webcenter/page/scopedMD/se2dff4fb_202a_4f4c_b56d_c7cf59ad1c04/PortalSiteHome.jspx

Path to the Home page of the current portal

GroupSpaceDocLibMainView.jspx

/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/GroupSpaceDocLibMainView.jspx

Path to the Documents page in the current portal

ForumMainView.jspx

/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/ForumMainView.jspx

Path to Discussions page in the current portal

AnnouncementsMainView.jspx

/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/AnnouncementsMainView.jspx

Path to Announcements page in current portal

ListsMainView.jspx

/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/ListsMainView.jspx

Path to Lists page in current portal

EventsMainView.jspx

/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/EventsMainView.jspx

Path to Events page in current portal

GroupSpaceActivityStreamMainView.jspx

/faces/oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/businessRolePages/GroupSpaceActivityStreamMainView.jspx

Path to Activity Stream page in current portal

A.19.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-26 lists the built-in EL expressions available under the category System and provides an example of the types of values each returns.

Table A-26 Built-In EL Expressions Under System

Option Expression Example of Returned Value

User

#{securityContext.userName}

The current user's user name

Locale

#{facesContext.externalContext.requestLocale}

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.19.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-27 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-27 Built-In EL Expressions Under User Info

Option Expression Example of Returned Value

About Me

#{webCenterProfile[securityContext.userName].description}

Returns the content of the About Me attribute of the current user's Profile

Username

#{webCenterProfile[securityContext.userName].userName}

The user name specified in the current user's Profile

First Name

#{webCenterProfile[securityContext.userName].firstName}

The current user's first name

Middle Name

#{webCenterProfile[securityContext.userName].middleName}

The current user's middle name

Last Name

#{webCenterProfile[securityContext.userName].lastName}

The current user's last name

Initials used

#{webCenterProfile[securityContext.userName].initials}

The current user's initials

Display Name

#{webCenterProfile[securityContext.userName].displayName}

The current user's display name

Email

#{webCenterProfile[securityContext.userName].businessEmail}

The current user's business email address

Department

#{webCenterProfile[securityContext.userName].department}

The current user's department

Job Title/Designation

#{webCenterProfile[securityContext.userName].title}

The current user's job title or designation

Manager

#{webCenterProfile[securityContext.userName].managerDisplayName}

The current user's manager's display name

Time zone

#{webCenterProfile[securityContext.userName].timeZone}

The time zone associated with the current user

Employee type

#{webCenterProfile[securityContext.userName].employeeType}

The current user's employee type

Employee Number

#{webCenterProfile[securityContext.userName].employeeNumber}

The current user's employee number

Preferred Language Code

#{webCenterProfile[securityContext.userName].preferredLanguage}

The current user's preferred language

Organization

#{webCenterProfile[securityContext.userName].organization}

The company organization to which the current user belongs

Organizational Unit

#{webCenterProfile[securityContext.userName].organizationalUnit}

The unit of the company organization to which the current user belongs

Expertise

#{webCenterProfile[securityContext.userName].expertise}

The current user's expertise; for example, Application, system, and database administration

Business Fax

#{webCenterProfile[securityContext.userName].businessFax}

The current user's business fax number

Business Mobile Number

#{webCenterProfile[securityContext.userName].businessMobile}

The current user's business mobile or cell phone number

Business Phone

#{webCenterProfile[securityContext.userName].businessPhone}

The current user's business phone number

Business Pager Number

#{webCenterProfile[securityContext.userName].businessPager}

The current user's business pager number

Business Street

#{webCenterProfile[securityContext.userName].businessStreet}

The street address of the current user's business office

Business City

#{webCenterProfile[securityContext.userName].businessCity}

The city where the current user's business office is located

Business State

#{webCenterProfile[securityContext.userName].businessState}

The state where the current user's business office is located

Business PO Box

#{webCenterProfile[securityContext.userName].businessPOBox}

The current user's business Post Office Box number

Business Postal Code

#{webCenterProfile[securityContext.userName].businessPostalCode}

The postal or ZIP code of the current user's business office

Business Country

#{webCenterProfile[securityContext.userName].businessCountry}

The country where the current user's business office is located

Home Address

#{webCenterProfile[securityContext.userName].homeAddress}

The current user's home address

Home phone

#{webCenterProfile[securityContext.userName].homePhone}

The current user's home phone number

Date of Birth

#{webCenterProfile[securityContext.userName].dateofBirth}

The current user's date of birth

Maiden Name

#{webCenterProfile[securityContext.userName].maidenName}

The current user's maiden name

Date of hire

#{webCenterProfile[securityContext.userName].dateofHire}

The date the current user was hired by the company

Name Suffix

#{webCenterProfile[securityContext.userName].nameSuffix}

Titles or credentials appended to the current user's name, for example, MD, Esq, and so on

Wireless Account Number

#{webCenterProfile[securityContext.userName].wirelessAcctNumber}

The account number for the current user's wireless internet account

A.19.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-28 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-28 Built-In EL Expressions Under WebCenter Events

Option Expression Example of Returned Value

Selected User Name

#{wcEventContext.events.WebCenterUserSelected.UserName}

The user name of the currently selected user

Selected Document Name

#{wcEventContext.events.WebCenterResourceSelected.name}

The name of the currently selected document

Selected Document Creator

#{wcEventContext.events.WebCenterResourceSelected.createdBy}

The name of the user who created the currently selected document

Selected Document Last Modified By

#{wcEventContext.events.WebCenterResourceSelected.lastModifiedBy}

The date the selected document was last modified

A.20 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 as wCond[p][op][v].

    Where:

    • p is a portal attribute (a field in WcSpaceHeader, 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 operator op.

      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 the WHERE 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 with wCond) are types of conditions.

    Where:

    • and represents a conjunction of two conditions. You can express a conjunction condition as cond1['and'][cond2] where cond1 and cond2 are the expressions for the two conditions being conjoined.

    • or represents a disjunction condition. You can express a disjunction condition as cond1['or'][cond2] where cond1 and cond2 are the expressions for the two conditions being disjoined.

    • not represents a negation condition. You can express a negation condition as cond['not'] where cond 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 in WcSpaceHeader).

  • desc and asc 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:

  1. 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')
    
  2. 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>
    
  3. Save and close webcenter-config.xml.xml.

  4. 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')