Oracle® Fusion Middleware User's Guide for Oracle WebCenter Spaces 11g Release 1 (11.1.1.5.0) Part Number E10149-07 |
|
|
View PDF |
When configuring page components, you can express values as variables that take advantage of the current application context by grabbing information that happens to be true at the moment. 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 the like.
Such flexibility is made possible through the Expression Builder that is provided with each Parameter and Display Option property.
This appendix provides information about the editor and useful EL expressions. It includes the following subsections:
See Also:
For additional information about EL APIs, see Oracle Fusion Middleware Java API Reference for Oracle WebCenter.All properties on the Parameters and Display Options tabs provide an Expression Builder icon that opens a simple Expression Language (EL) editor, called the Expression Builder. Use the Expression Builder when you want to formulate a dynamic computation for an otherwise unknown property value, for example, to specify the current user, the current page mode, and the like.
Click the Expression Builder icon next to a property to open the editor. (Figure B-1).
Figure B-1 Expression Builder Icon Next to a Parameter Value Field and the Resulting Editor
See Also:
For information about accessing component properties, see Section 17.5.2, "Setting Properties on Page Components."The Expression Builder is particularly useful when you want a value that is retrievable but otherwise unknown, for example, when you want a value to be the name of the current user or the current application skin.
The Expression Builder provides two options for entering expressions:
Choose a value, for selecting a seeded EL expression
Type a value or expression, for entering an expression manually
The options under Choose a value 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 (Figure B-2).
Figure B-2 Options Under Choose a value in the Expression Builder
See Also:
For information about seeded EL expressions, see Section B.3.1, "Seeded Expressions in the Expression Builder."The option Type a value or expression is followed by a text box, which you can use to manually enter the expression you intend (Figure B-3).
Figure B-3 Text Box Under Type a value or expression in the Expression Builder
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 resource-related ELs to form a single query that returns a particular Space template. It retrieves the template storesMasterTemplate
from the parent Space stores
:
#{srmContext.resourceScope['stores'].resourceType['siteTemplate'].displayName['storesMasterTemplate'].singleResult}
In the Expression Builder, select predefined values, under Choose a value, or enter a value or an Expression Language expression, under Type a value or expression.
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}
The editor provides a Test button for validating your EL entry. The Test button is available for expressions entered in the text box under Type a value or expression.
Validation checks the EL syntax and evaluates the expression. Because expression values vary according to the context in which they are executed, the resulting value that appears in the editor may differ from the value returned during actual use.
Note, however, that only EL is validated when you click Test; other types of values are not validated.
Test results are shown in a popup (Figure B-4).
This section provides an example of using EL expressions to display something based on a user's role, permissions, and the like.
In this example, we will use Expression Language to reveal or hide an item in the navigation model based on the user's role. Because there is Expression Language for almost every piece of metadata maintained by WebCenter Spaces, using ELs to personalize the user's experience is an extremely powerful tool.
You can use the following EL to determine a user's role:
#{WCSecurityContext.userInScopedRole['Role 1'] or WCSecurityContext.userInScopedRole['Role 2']}
This EL compares the current user's credentials (in this case, the role), against what is specified in the EL. If the result is true
, that is, if the user is assigned one of the specified roles then the navigation item is visible to the user. If the result is false
, the navigation item is hidden from the user.
The roles referred to in the EL can be a system role, such as Administrator
, Moderator
, Participant
, or a custom role.
Notice that this EL joins two conditions with the use of an OR
clause; that is, the user must have either Role 1 OR Role 2 to be able to see the navigational item.
These steps demonstrate how to add a navigational item (a page query for another Space) that is visible only to user assigned the role Moderator
.
Note:
This exercise assumes you have applied a custom navigation model to your Space. You cannot edit a seeded navigation model.To personalize navigation:
Go to Space Settings, and access the Navigations panel under Resources.
You can use the following URL to navigate to the Resources subpage, from there, click Navigations:
http://host:port/webcenter/spaces/spaceName/admin/resources
Select the navigation model that the Space is using.
Tip:
To find out which navigation model the current Space is using, go to the General subpage under Space Settings, and look for the value in the Navigation field.From the Edit menu, select Edit.
In the Edit - navigation model dialog, expand the Add menu, and select Pages Query.
Bring the Target tab forward:
In the Name field, enter a name for your query, for example, moderatorQuery
.
Next to Find Page in, select Space, and ensure that the current Space name appears in the field.
Click the icon to the right of the Visible checkbox, and select Expression Builder.
Select Choose a value, and then select Space Info from the first dropdown and CurrentSpace Role - Moderator from the second.
The expression #{WCSecurityContext.userInScopedRole['Moderator']}
appears in the text field.
Tip:
If you are working with a custom role, you choose CurrentSpace Role - Custom from the dropdown. In the text area, highlightCustomRole
, then type in the name of your custom role.Click OK until you return to the Resources tab.
To test this, add a member to the Space, and assign this user any role other than Moderator. Log off and log back in as that user. You should not see the Pages Query navigational item.
This section provides a series of tables that list and describe useful EL expressions. Tables are grouped according to the context in which the expressions they contain apply.
This section includes the following subsections:
Section B.3.1, "Seeded Expressions in the Expression Builder"
Section B.3.2, "EL Expressions Relevant to the WebCenter Spaces Application"
Section B.3.3, "EL Expressions Relevant to Application Security"
Section B.3.4, "EL Expressions Relevant to Application Navigation"
Section B.3.11, "EL Expressions Relevant to the Personalization Conductor"
Section B.3.12, "EL Expressions Relevant to the Documents Service"
Section B.3.13, "EL Expressions Relevant to the People Connections Service"
Section B.3.14, "EL Expressions Relevant to User Preferences"
In the Expression Builder editor, when you select the option Choose a value you can populate the text box in the dialog with a seeded EL expression. First, select an expression category, and 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 B-5).
Figure B-5 Options Under Choose a value in the Expression Builder
This section is broken into subsections for each category. Each subsection lists and describes the ELs associated with that category.
This section includes the following subsections:
Application Info seeded EL expressions return values related to the WebCenter Spaces application. For example, the expression #{WCAppContext.application.applicationConfig.title}
, returns the application title that is specified on the Configuration page in the WebCenter Administration pages.
See Also:
For additional EL expressions related to the application, see Section B.3.2, "EL Expressions Relevant to the WebCenter Spaces Application."Table B-1 lists the seeded EL expressions available under the category Application Info and provides an example of the types of values each returns.
Table B-1 Seeded EL Expressions Under Application Info
Option | Expression | Example of Returned Value |
---|---|---|
Current Scope |
|
|
Current Page Template Scope |
|
|
Previously Set Page Template |
|
|
Application |
|
|
Application URL |
|
|
Current WebCenter URL |
|
|
Application Config |
|
|
Application Config Title |
|
|
Application Config Logo |
|
|
Application Config HelpPage |
|
|
Application Config CopyrightMessage CustomValue |
|
|
Application Config Privacy Policy URL |
|
|
Application Config Skin |
|
|
Page Info seeded EL expressions return values related to WebCenter Spaces pages. For example, the expression #{pageDocBean.createdBy}
, returns the user name of the person who created the current page.
Table B-2 lists the seeded EL expressions available under the category Page Info and provides an example of the types of values each returns.
Table B-2 Seeded EL Expressions Under Page Info
Option | Expression | Example of Returned Value |
---|---|---|
Title |
|
|
Created By |
|
j.doe |
Create Date String |
|
|
Last Updated By |
|
|
Last Update Date String |
|
|
Page Path |
|
|
Name |
|
|
UI CSS Style |
|
|
UI Scheme BG Image |
|
|
UI BG String Color Scheme |
|
null |
Page Permission |
|
|
Page Security Target |
|
|
Page Parameter seeded EL expressions return values related to WebCenter Spaces 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 seeded page style Three Column provides five seeded page parameters (see Table B-3). 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. Of the seeded page styles, Blank, Home Page, Left Narrow, and Right Narrow all provide the same seeded page parameters (see Table B-3). Additionally, any page may have its own custom page parameters.
Whether seeded or custom, available page parameters are exposed in the Expression Builder editor under the Page Parameter category.
See Also:
For more information about creating and using page parameters, see Section 19.3, "Wiring Components and Page Parameters."Table B-3 lists the EL expressions available under the Page Parameter category for pages based on the styles Three Column, Blank, Home Page, Left Narrow, and Right Narrow. It provides an example of the types of values each returns.
Resource Info seeded EL expressions return values related to WebCenter Spaces resources, such as templates, styles, resource catalogs, and the like. For example, the expression #{srmContext.id['
ResourceID
'].singleResult}
, returns the resource with the specified GUID.
See Also:
For additional resource-related EL expressions, see Section B.3.5, "EL Expressions Relevant to Resources."Table B-4 lists the seeded EL expressions available under the category Resource Info and provides an example of the types of values each returns.
Table B-4 Seeded EL Expressions Under Resource Info
Option | Expression | Example of Returned Value |
---|---|---|
Resource ID |
|
|
Resource Display Name |
|
See Resource ID for an example of a returned value. |
Description |
|
See Resource ID for an example of a returned value. |
Creation Date |
|
See Resource ID for an example of a returned value. |
Modified By |
|
See Resource ID for an example of a returned value. |
Modified Date |
|
See Resource ID for an example of a returned value. |
Resource Scope |
|
See Resource ID for an example of a returned value. |
Space Info seeded EL expressions return values related to Spaces (other than the Home Space). For example, the expression #{spaceContext.space['
spaceName
'].children}
, returns a list of the Subspaces under the named parent Space.
See Also:
For additional Space-related EL expressions, see Section B.3.6, "EL Expressions Relevant to Specific Spaces."Table B-5 lists the seeded EL expressions available under the category Space Info and provides an example of the types of values each returns.
Note:
Use the EL expressions listed in Table B-5 only in the context of Spaces other than the Home Space.Table B-5 Seeded EL Expressions Under Space Info
Option | Expression | Example of Returned Value |
---|---|---|
NamedSpace |
|
|
CurrentSpace |
|
|
CurrentSpace Name |
|
|
NamedSpace Metadata Path |
|
|
CurrentSpace Metadata Path |
|
|
NamedSpace Metadata |
|
|
CurrentSpace Metadata |
|
|
NamedSpace Metadata DisplayName |
|
|
CurrentSpace Metadata DisplayName |
|
|
NamedSpace Metadata Icon |
|
|
CurrentSpace Metadata Icon |
|
|
NamedSpace Metadata Description |
|
|
CurrentSpace Metadata Description |
|
|
NamedSpace Metadata CreationDate |
|
|
CurrentSpace Metadata CreationDate |
#{spaceContext.currentSpace.metadata.creationDate} |
|
NamedSpace Metadata CreatedBy |
|
|
NamedSpace Metadata Keywords |
|
|
CurrentSpace Metadata Keywords |
|
|
NamedSpace Metadata Offline |
|
|
CurrentSpace Metadata Offline |
|
|
NamedSpace Metadata Closed |
|
|
CurrentSpace Metadata Closed |
|
|
NamedSpace Metadata SelfRegistration |
|
|
CurrentSpace Metadata SelfRegistration |
|
|
NamedSpace Metadata Discoverable |
|
|
CurrentSpace Metadata Discoverable |
|
|
NamedSpace Metadata PublishRSS |
|
|
CurrentSpace Metadata PublishRSS |
|
|
NamedSpace Distribution List |
|
|
CurrentSpace Distribution List |
|
|
NamedSpace Metadata CustomAttributes |
|
Returns the value provided for the named custom attribute |
CurrentSpace Metadata CustomAttributes |
|
Returns the value provided for the named custom attribute |
CurrentSpace Metadata Logo |
|
|
CurrentSpace Role - Moderator |
|
|
CurrentSpace Role - Participant |
|
|
CurrentSpace Role - Viewer |
|
|
CurrentSpace Role - Custom |
|
|
NamedSpace Children |
|
Note: The braces ([]) denote a set. |
CurrentSpace Children |
|
Note: The braces ([]) denote a set. |
NamedSpace Parent |
|
|
CurrentSpace Parent |
|
|
NamedSpace Security Parent |
|
|
CurrentSpace Security Parent |
|
|
All visible root level spaces |
|
|
All children and descendent spaces for specified Parent Space GUID |
|
|
Immediate Sub Spaces for specified Parent Space name |
|
|
List of Spaces matching given Space Names |
|
|
List of Spaces matching given Space GUID |
|
|
List of Spaces sorted based on criteria |
|
|
List of Spaces based on search pattern |
|
|
List of Spaces with limited page size |
|
|
List of Spaces matching the where clause |
|
|
Rather than EL expressions, the selections under Space Page Info are directory paths to different application pages. Use them, for example, to provide navigation information to a specified page.
Table B-6 lists the seeded directory paths available under the category Space Page Info and provides an example of the types of values each returns.
Table B-6 Seeded Paths Under Space Page Info
Option | Path | Destination |
---|---|---|
COIHome.jspx |
|
Path to the Home page of the current Space |
GroupSpaceDocLibMainView.jspx |
|
Path to the Documents page in the current Space |
ForumMainView.jspx |
|
Path to Discussions page in the current Space |
AnnouncementsMainView.jspx |
|
Path to Announcements page in current Space |
EventsMainView.jspx |
|
Path to Events page in current Space |
ListsMainView.jspx |
|
Path to Lists page in current Space |
GroupSpaceActivityMainView.jspx |
|
Path to Activity Stream page in current Space |
System seeded 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 Section B.3.15, "Utilitarian EL Expressions."Table B-7 lists the seeded EL expressions available under the category System and provides an example of the types of values each returns.
Table B-7 Seeded EL Expressions Under System
Option | Expression | Example of Returned Value |
---|---|---|
User |
|
The current user's user name |
Locale |
|
The current user's specified locale This may be taken from application or Space-level settings or user Preferences, whichever is taking precedence. For example: en_US |
User Info seeded 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 Section B.3.13, "EL Expressions Relevant to the People Connections Service."Table B-8 lists the seeded EL expressions available under the category User Info and provides an example of the types of values each returns.
Table B-8 Seeded EL Expressions Under User Info
Option | Expression | Example of Returned Value |
---|---|---|
About Me |
|
Returns the content of the About Me attribute of the current user's Profile |
Username |
|
The user name specified in the current user's Profile Compare this with the current user's display name. |
First Name |
|
The current user's first name |
Middle Name |
|
The current user's middle name |
Last Name |
|
The current user's last name |
Initials used |
|
The current user's initials |
Display Name |
|
The current user's display name Compare this with the current user's user name. |
|
|
The current user's business email address |
Department |
|
The current user's department |
Job Title/Designation |
|
The current user's job title or designation |
Manager |
|
The current user's manager's display name |
Time zone |
|
The time zone associated with the current user |
Employee type |
|
The current user's employee type |
Employee Number |
|
The current user's employee number |
Preferred Language Code |
|
The current user's preferred language |
Organization |
|
The company organization to which the current user belongs |
Organizational Unit |
|
The unit of the company organization to which the current user belongs |
Expertise |
|
The current user's expertise, for example, |
Business Fax |
|
The current user's business fax number |
Business Mobile |
|
The current user's business mobile or cell phone number |
Business Phone |
|
The current user's business phone number |
Business Pager |
|
The curren user's business pager number |
Business Street |
|
The street address of the current user's business office |
Business City |
|
The city where the current user's business office is located |
Business State |
|
The state where the current user's business office is located |
Business PO Box |
|
The current user's business Post Office Box number |
Business Postal Code |
|
The postal or ZIP code of the current user's business office |
Business Country |
|
The country where the current user's business office is located |
Home Address |
|
The current user's home address |
Home phone |
|
The current user's home phone number |
Date of Birth |
|
The current user's date of birth |
Maiden Name |
|
The current user's maiden name |
Date of hire |
|
The date the current user was hired by the company |
Name Suffix |
|
Titles or credentials appended to the current user's name, for example, |
Wireless Account Number |
|
The account number for the current user's wireless internet account |
WebCenter Events seeded EL expressions return values related to document-related events, such a 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 B-9 lists the seeded EL expressions available under the category WebCenter Events and provides an example of the types of values each returns.
Table B-9 Seeded EL Expressions Under WebCenter Events
Option | Expression | Example of Returned Value |
---|---|---|
Selected User Name |
|
The user name of the currently selected user |
Selected Document Name |
|
The name of the currently selected document |
Selected Document Creator |
|
The name of the user who created the currently selected document |
Selected Document Last Modified |
|
The date the selected document was last modified |
Table B-10 lists EL expressions relevant to WebCenter Spaces application information and describes the types of functionality it provides. The Context column indicates whether the expression can be used in a WebCenter Spaces context (WCS) or in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper (Both).
Table B-10 EL Expressions Relevant to WebCenter Spaces Application Information
Expression | Function | Context |
---|---|---|
|
An oracle.webcenter.webcenterapp.context.WCApplicationContext object that provides an access point in the current web request for all WebCenter application-related information. |
WCS |
|
Returns a URL representing the current web request with bookmarkable WebCenter Spaces URL parameters of the request appended to the end (parameters are not necessarily in a fixed order). Example: http://name.us.oracle.com/webcenter/faces/oracle/webcenter/page/scopedMD/someguid/SomePage.jspx? wc.contextURL=/spaces/somename&wc.pageScope=1234 |
WCS |
|
An oracle.webcenter.webcenterapp.beans.WebCenterType bean with a payload of metadata from the current WebCenter Spaces application. |
WCS |
|
Returns the display name of the current WebCenter Spaces application (as configured through WebCenter Administration settings). Out of the box, this returns WebCenter. |
WCS |
|
If an application logo was uploaded through WebCenter Administration settings, this expression returns the URL to the application logo image. Out of the box, this returns null. |
WCS |
|
Returns the URL to the Help application used for the current WebCenter Spaces application (as configured through WebCenter Administration settings). Out of the box, this returns /webcenterhelp/spaces. |
WCS |
|
If a copyright message was configured through WebCenter Administration settings, this expression returns the application copyright message. Out of the box, this returns null. |
WCS |
|
Returns the URL to the document that contains the application's privacy policy (as configured through WebCenter Administration settings). Out of the box, this returns http://www.oracle.com/html/privacy.html |
WCS |
|
Returns the name of the default ADF Faces skin family to use for rendering pages in the application (as configured through WebCenter 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 (for more information, see Chapter 35, "Setting Your Personal Preferences"). |
WCS |
|
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 |
Both |
Table B-11 lists EL expressions relevant to application security and describes the types of functionality it provides. The Context column indicates whether the expression can be used in a WebCenter Spaces context (WCS) or in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper (Both).
See Also:
For example implementations of expressions related to component-level security, see Section 23.2, "Setting Access on a Page Component."Table B-11 EL Expressions Relevant to Security
Expression | Function | Context |
---|---|---|
|
Returns |
Both |
|
Returns the user name of the currently logged in user. If the current user is not logged in, this expression returns no value. |
Both |
|
Returns the value true if the current user is a moderator of the current Space. |
WCS |
|
Returns the value true if the current user is assigned the specified role in the current scope. Role can be The scope is implicitly resolved to be the current scope. If you use this EL in the Home Space, it resolves to Home Space GUID and roles defined at the application level. If you use this EL in a Space scope, it resolves to roles defined for the Space. |
WCS |
|
Returns the value true if the current user is assigned the specified group, for example, |
Both |
|
Returns the value true if the current user is the specified user. |
Both |
Table B-12 lists EL expressions relevant to WebCenter Spaces navigation and describes the types of functionality it provides. All navigation ELs can be used in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper.
Table B-12 EL Expressions Relevant to Navigation
Expression | Function |
---|---|
Navigation Context Expressions |
|
|
Returns default navigation model. It gets the value from the preference bean. The preference bean gets the value based on the preference setting in The following example returns the specified default tree model: #{navigationContext.defaultNavigationModel.defaultTreeModel} You can also use |
|
Returns the navigation model used to navigate to the current view (that is, the current page) There may be a number of navigation models on the page. Only the one used to navigate to the page is the current navigation model. The current navigation model is set only when the The following example returns the default tree model for the current navigation model: #{navigationContext.currentNavigationModel.defaultTreeModel} You can also use See Also: |
|
Returns the navigation model specified by path. Example: #{navigationContext.navigationModel['/oracle/webcenter/portalapp/navigations/default-navigation-model']} User can simply enter the path in the square bracket without having to remember the parameter name. For backward compatibility, comma-separated parameters are also supported. Available parameters (with examples) are:
Note: #{navigationContext.navigationModel['modelScope=/oracle/webcenter/portalapp/navigations,modelId=default-navigation-model']} |
|
Returns the default navigation method for binding to UI component's The Example using the <af:forEach var="node" varStatus="vs"
items="#{navigationContext.defaultNavigationModel.rootNode.children}">
<af:subform id="pt_sfm1">
<af:commandLink id="pt_cl1"
text="#{node.title}"
inlineStyle="font-size:small;color:White;"
actionListener="#{navigationContext.processAction}"
action="pprnav">
<f:attribute name="node" value="#{node}"/>
<af:showPopupBehavior popupId="menuPopup"
align="afterStart"
triggerType="mouseOver"/>
</af:commandLink>
Example using the <af:commandLink id="pt_cl1" text="Prescriptions" inlineStyle="font-size:small; color:White;" actionListener="#{navigationContext.processAction}" action="pprnav"> <f:attribute name="path" value="/prescriptions"/> <f:attribute name="model" value="#{navigationContext.defaultNavigationModel}"/> </af:commandLink> |
Navigation Model Expressions |
|
|
Returns a tree/menu/list model based on the default settings The default values for the settings are specified in the next row. For example, the default value for For This expression returns a model of type:
|
|
Returns tree/menu/list model based on the specified comma-separated parameters. Available parameters (with default values as examples) are:
For Example: #{navigationContext.defaultNavigationModel.treeModel['startNode=home,includeStartNode=false,depth=2']} |
|
Returns a root node (of type Example: <af:commandLink id="pt_cl1" text="Prescriptions" inlineStyle="font-size:small; color:White;" actionListener="#{navigationContext.processAction}" action="pprnav"> <f:attribute name="node" value="#{navigationContext. defaultNavigationModel. rootNode.children[2]"/> </af:commandLink> |
|
Returns a node (of type Example: #{navigationContext.defaultNavigationModel.node['home/page1']} |
|
Returns currently selected navigation resource. |
|
Sets the current selection to a node specified by the given path (you do not need "/" prefix unless you are requesting the root node, for example, The user must have the ability to explicitly set the current selection without having to actually navigate to a node. This can be used where the user enters a page directly, and no selection is set. It provides a mechanism for the user to control what is the default when there is no current selection. Example: <c:set value="${navigationContext.defaultNavigationModel.newCurrentSelection['home/page1']}" var="currSel" scope="session"/> <c:if test="${currSel!=null}"> <af:forEach items="#{currSel.children}" var="cnode" varStatus="cnodestatus"> ...</c:if> |
|
Returns the value of the specified attribute of the navigation model. |
Navigation Resource Expressions |
|
|
Returns the value of the specified attribute of the navigation resource. |
|
Returns the value of the specified parameter of the navigation resource. |
|
Returns the raw value of the specified parameter of the navigation resource (before it is evaluated). |
|
Returns the title of the navigation resource. |
|
Returns the path to the navigation resource. |
|
Returns the URL for the navigation resource of type |
|
Returns the identifying path for this navigation resource. |
|
Returns a collection of identifying paths by depth to enable its use as a starting path to drive another navigation view. For example, assuming the #{node.prettyUrlPath[3]}
|
|
Returns the identifying path for this navigation resource suitable for <af:goLink id="pt_gl2" text="#{node.title}" destination="#{node.goLinkPrettyUrl}" targetFrame="#{node.attributes['Target']}" inlineStyle="font-size:small;#{node.selected ? 'font-weight:bold;' : ''}"/> |
|
Returns whether this resource is a separator item. |
|
Returns whether it is possible to navigate to this resource. |
|
Returns whether this resource is currently selected. |
|
Returns whether the resource is the currently selected resource and the model is the currently selected model. |
|
Returns whether this node lies on the selected path. This is useful for highlighting the selected tab, for example. For example, assuming the currently selected node is <c:set value="${navigationContext.defaultNavigationModel.node['home']}" var="home" scope="session"/> <af:commandImageLink id="cil1" icon="#{(home.onSelectedPath) ? '/images/caremark/nav/HomeSelected.png' : '/images/caremark/nav/HomeIcon.png'}" actionListener="#{navigationContext.processAction}" action="pprnav"> <f:attribute name="node" value="#{home}"/></af:commandImageLink> |
|
Returns whether this resource is a leaf node. |
|
Returns the parent node (of type |
|
Returns the hierarchy list of ancestors of this node (of type NavigationResource) starting with the root node. For example, assuming the current node is
|
|
Returns the depth of this node from the root node. Root node has a depth of zero. |
|
Returns the list of siblings (of type |
|
Returns the next sibling in the list (of type NavigationResource) of this node. For example, the following code ensures that you do not output two separators in a row: <c:if test="${(node.separator) && (!node.nextSibling.separator}"> <af:separator id="s166"/> </c:if> |
|
Returns the previous sibling in the list (of type |
|
Returns the zero-relative index of this node relative to its siblings. |
|
Returns a collection of child resources. |
|
Returns the number of children of this node. |
|
Returns the child node (of type If not found, this returns |
|
Returns the child node (of type The path can be deeper than one level and does not need the |
Use the expressions in this section to query for resources. Querying for a resource through an EL expression is similar to querying for it through an API call. That is, you must set query parameters in the format .
property
['
value
']
, where property
is the name of the property, for example, id
, resourceScope
, and the like, and value
is the search value for the attribute.
A query can result in single or multiple results. The query designer must decide what is wanted. The query designer determines whether to return one or multiple results by encountering one of the following values in the expression:
singleResult
—Returns a single resource. When no matching resource is found, null is returned.
resultList
—Returns a list of resources. When no matching resources are found, an empty list is returned.
Note:
Occurrences ofsingleResult
or resultList
in the expression are used internally as the query end point, and, after this, the query is executed immediately. Anything set after the end point can result in unexpected behavior.The following example returns the first template resource found with a display name that contains myPage
:
#{srmContext.resourceType['siteTemplate'].displayName['myPage'].singleResult}
The following example returns a list of template resources residing in the directory resourceDir
, with a description that contains sampleDesc
:
#{srmContext.resourceType['siteTemplate'].description['sampleDesc'].contentDirectory['resourceDir'].resultList}
A property of this class includes any attribute of this class. Example properties include: Id
, DisplayName
, iconURI
, contentDirectory
, and the like.
The property value can be an explicit value or an EL expression that returns that type of value. For example, the following two queries return the same result:
#{srmContext.id['resourceId'].singleResult}
#{srmContext.id['spacesContext.currentSpace.uiMetadata.siteTemplateId'].singleResult}
You can use any property of this class in an EL-based query in the format property
['
value
']
and in any order. For example, the following two queries return the same result:
#{srmContext.resourceScope['scopeName'].id['resourceId'].singleResult} #{srmContext.id['resourceId'].resourceScope['scopeName'].singleResult}
Table B-13 lists EL expressions relevant to WebCenter resources and describes the types of functionality each provides. You can use all resource EL expressions in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper.
Table B-13 ELs Relevant to WebCenter Site Resources
EL | Function |
---|---|
|
Returns the resource with the specified ID |
|
Returns any resources with the specified display name |
|
Returns any resources with the specified display name key |
|
Returns one result of a resource that contains the specified value in its description To get multiple results, use |
|
Returns one result of a resource with the specified description key The description key is the key in the To get multiple results, use |
|
Returns any resource with the specified creation date |
|
Returns any resource that was last modified bythe user with the specified user name |
|
Returns any resource that was last modified by the specified date |
|
Returns any resource that falls within the specified scope |
|
Returns any resource that falls within the specified category For example: #{srmContext.category['siteTemplates']} |
|
Returns any resource that is stored within the specified directory |
|
Returns resource metadata from the specified metadata file For example, the following expression returns resource metadata from the following file #{srmContext.metadataFile['/home/metadat/data.xml']} |
|
Returns any For example, the following expression returns the #{srmContext.jspx['/home/web/page.jspx']} |
|
Returns any |
|
Returns the icon at the specified icon URI |
|
In a larger expression, returns all specified resources except those available in the excluded scopes |
|
In a larger expression, returns any resource the either does or does not use custom security Set #{srmContext.usesCustomSecurity['TRUE']} |
|
In a larger expression, returns any resource that is or is not seeded, depending on the provided value Set #{srmContext.seeded['TRUE']} |
|
In a larger expression, returns any resource that is of the specified type of visibility Set #{srmContext.visibleType['TRUE']} |
|
In a larger expression, returns one or multiple resources with visibility set to either |
|
In a larger expression, returns any resource created by the specified user |
|
In a larger expression, returns one or multiple resources of the specified type For example, the following expression searches for a resource of the type #{srmContext.resourceType['SITE_TEMPLATE']} Note that all resource types are listed in Oracle Fusion Middleware Java API Reference for Oracle WebCenter, in the |
|
In a larger expression, returns one or multiple resources available in the application of the specified version |
|
In a larger expression, returns one or multiple resources available in the specified scope For example, the following expression searches for resources in the scope (in this instance, the Space) #{srmContext.resourceScope['MySpace']} To search in the default scope, that is, the application scope, use |
|
In a larger expression, returns one or multiple resources that contain or equal the values set by other included expressions Set |
Table B-14 lists EL expressions relevant to Spaces and describes the types of functionality each provides. All of the listed ELs are for use in WebCenter Spaces.
Note:
The Space internal name is the name specified by the Space URL on the General page of a Space's administration settings. The Space display name is specified by Display Name. Many of the EL expressions in Table B-14 call for the Space internal name.Table B-14 EL Expressions Relevant to WebCenter Spaces Spaces
Expression | Function |
---|---|
|
An oracle.webcenter.spaces.context.SpacesContext object that provides an access point in the current web request for all Space-related information. The value of this expression is whatever is returned on invoking the java API: |
|
An oracle.webcenter.spaces.Space object that represents the Space associated with the current web request. If the current web request is in the Home Space context, it returns a value of null. The value of this expression is whatever is returned on invoking the Java API: |
|
The name of the Space associated with the current web request. If the current web request is in a Home Space context, it returns a value of null. The value of this expression is whatever is returned on invoking the java API: |
|
An oracle.webcenter.spaces.Space object that represents the Space that is named 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. |
|
The MDS path of the space metadata document for the Space with specified name The value of this expression is whatever is returned in java on invoking .getMetadataPath() on the space object for the Space. |
|
An oracle.webcenter.spaces.beans.SpaceType bean that carries metadata about the Space that is named The value of this expression is whatever is returned in java on invoking .getMetadata() on the space object for the Space passing in the MDSSession of the current ADFContext. |
|
The display name of the Space that is named |
|
A URL to the icon associated with the Space that is named |
|
The description of the Space that is named |
|
A java.util.Calendar object representing the date-time on which the Space with specified name |
|
The user-name of the person who created the Space that is named |
|
A comma-delimited list of searchable keywords associated with the Space with the name |
|
Boolean value that indicates whether the Space that is named |
|
Boolean value that indicates whether the Space that is named |
|
Boolean value that indicates whether users are allowed to register themselves with the Space that is named |
|
Boolean value that indicates whether users can discover the existence of the Space that is named |
|
Boolean value indicating whether the Space that is named |
|
The email address of the mailing list associated with the Space that is named |
|
The value of a specific custom attribute of the name |
|
Returns the logo URL for the Space named |
|
A means of querying a Space using a query parameter in the form of If For example, the following EL expression returns a list of all discoverable Spaces. #{spaceContext.spacesQuery.unionOf['DISCOVERABLE'].listSpaces} If For example, the following EL expression returns an instance of type #{spaceContext.spacesQuery.unionOf['DISCOVERABLE']} |
|
Returns a list of all top-level Spaces of which the current user is a member This EL returns only those Spaces that do not have a parent, that is, it does not return Subspaces. |
|
Returns a list of all Spaces of which the current user is a member This EL also returns all the Subspaces under each of the parent Spaces to which the current user has access. |
|
Returns Spaces sorted into the order specified by the sort criteria For example, the following query returns a list of Spaces to which the user has access sorted by Note that in the following example, the idenitifier #{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].sortCriteria['sp.discoverable, sp.lastUpdateDate desc'].listSpaces} |
|
Allows specifying the page number (0-based) to select from the results matching the query criteria For example, the following expression returns a list of all Spaces to whichc a user has access and returns the third page of the result set: #{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].pageNumber[2].listSpaces]} |
|
Allows specifying the number of results to be included in each page when breaking down the result space into pages For example, the following expression returns a list of all Spaces to which a user has access, listing 10 records per page. #{spaceContext.spacesQuery.unionOf['ALL_QUERIABLE'].pageNumber[10].listSpaces]} |
Table B-15 lists EL expressions relevant to application pages and describes the types of functionality it provides. The Context column indicates whether the expression can be used in a WebCenter Spaces context (WCS) or in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper (Both). These expressions are useful in WebCenter Spaces and in custom WebCenter applications that include the Page service.
Table B-15 EL Expressions Relevant to Application Pages
Expression | Function |
---|---|
|
Returns the page display name, for example: FinanceProject |
|
Returns the user name of the person who created the page, for example: monty |
|
Returns the date and time the page was created, for example: 2008-11-19T10:18:36 |
|
Returns the user name of the person who last updated the page, for example: monty |
|
Returns the date and time the page was last updated, for example: 2008-11-19T10:18:36 |
|
Returns the file directory path to the page relative to the application root directory, for example: /oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/user/Umonty/Page4.jspx |
|
Returns the file name of the page, for example: Page4.jspx |
|
Returns the name of the style scheme used on the page, for example: WCSchemeEggShell |
|
Returns the directory path and file name of the page scheme background image. |
|
Returns the hexadecimal value of the page scheme background color, for example: #ffa500 |
|
Returns the permission the current user has on the page, for example: oracle.webcenter.page.model.security.CustomPagePermission |
|
A string of 60 or so characters that uniquely identifies the current page to the security system, for example: oracle_webcenter_page_scopedMD_s8bba98ff_4cbb_40b8_beee_296c916a23ed_user_Umonty_Page4PageDef |
Table B-16 lists EL expressions relevant to Oracle Composer. The Context column indicates whether the expression can be used in a WebCenter Spaces context (WCS) or in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper (Both). These expressions are useful in WebCenter Spaces and in custom WebCenter applications that include Oracle Composer.
Table B-16 EL Expressions Relevant to Oracle Composer
Expression | Function | Context |
---|---|---|
#{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 |
Both |
Table B-17 lists EL expressions relevant to the types of events that can trigger the passing of payloads (rather than events relevant to the Events service).
You can access all or part of the event payloads provided in Table B-17 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 B-17 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 Chapter 19, "Wiring Pages, Task Flows, Portlets, and UI Components."Table B-17 EL Expressions Relevant to Event Contexts
Expression | Function |
---|---|
Event Context #{wcEventContext.events.WebCenterResourceSelected} Document Name #{wcEventContext.events.WebCenterResourceSelected.name} Document Creator #{wcEventContext.events.WebCenterResourceSelected.createdBy} Document Last Modified By #{wcEventContext.events.WebCenterResourceSelected.lastModifiedBy} |
Use in context wiring between producer and consumer task flows. Returns a map that relates some piece of metadata from the producer to some piece of metadata from the consumer, for example, from a document creator to the creator's Profile. Producer task flows include:
Consumer task flows include:
|
Event Context #{wcEventContext.events.WebCenterUserSelected} User Name #{wcEventContext.events.WebCenterUserSelected.userName} User GUID #{wcEventContext.events.WebCenterUserSelected.userGUID} Space Name #{wcEventContext.events.WebCenterUserSelected.spaceName} Space GUID #{wcEventContext.events.WebCenterUserSelected.spaceGUID} |
Use in context wiring between producer and consumer task flows. Returns a map that relates some piece of metadata from the producer to some piece of metadata from the consumer, for example, from a user to the user's connections. Producer task flows include:
Consumer task flows include:
|
Event Context #{wcEventContext.events.WebCenterConnectionSelected} Profile User Name #{wcEventContext.events.WebCenterConnectionSelected.profileUserName} Profile User GUID #{wcEventContext.events.WebCenterConnectionSelected.profileUserGUID} Connected User Name #{wcEventContext.events.WebCenterConnectionSelected.userName} Connected User GUID #{wcEventContext.events.WebCenterConnectionSelected.userGUID} |
-- |
|
Returns the name of the selected Space |
|
Returns the GUID of the selected Space |
Table B-18 lists EL expressions relevant to services and describes the types of functionality it provides. All listed ELs can be used in both WebCenter Spaces and WebCenter Framework.
Table B-18 EL Expressions Relevant to Services
Expression | Function |
---|---|
|
An #{webcenterService['oracle.webcenter.doclib']} For service IDs, see Table B-19. |
|
Returns a Boolean value that indicates whether the WebCenter service with the service ID
For service IDs, see Table B-19. |
|
Returns the forum ID of the specified Space discussion forum. Enter the Space name in lieu of |
|
Returns the category ID of the specified Space discussion forums. Enter the Space name in lieu of |
Table B-19 lists service IDs associated with services at runtime.
Table B-19 Service IDs
Service | ID |
---|---|
Announcements |
oracle.webcenter.collab.announcement |
Discussions |
oracle.webcenter.collab.forum |
Documents and Wikis |
oracle.webcenter.doclib |
Events |
oracle.webcenter.collab.calendar.community |
Space Management |
oracle.webcenter.community |
Instant Messaging and Presence (IMP) |
oracle.webcenter.collab.rtc |
Links |
oracle.webcenter.relationship |
Lists |
oracle.webcenter.list |
|
oracle.webcenter.collab.mail |
Notes |
oracle.webcenter.note |
Notifications |
oracle.webcenter.notification |
Page |
oracle.webcenter.page |
People Connections: Activity Stream |
oracle.webcenter.activitystreaming |
People Connections: Connections |
oracle.webcenter.peopleconnections.connections |
People Connections: Feedback |
oracle.webcenter.peopleconnections.kudos |
People Connections: Message Board |
oracle.webcenter.peopleconnections.wall |
People Connections: Profile |
oracle.webcenter.peopleconnections.profile |
Polls |
oracle.webcenter.collab.survey |
Recent Activities |
oracle.webcenter.recentactivity |
Activity Graph |
oracle.webcenter.activitygraph |
RSS |
oracle.webcenter.rss |
Search |
oracle.webcenter.search |
Tags |
oracle.webcenter.tagging |
Blogs |
oracle.webcenter.blog |
Worklist |
oracle.webcenter.worklist |
Table B-20 lists EL expressions relevant to the Personalization Conductor and describes the types of functionality it provides. All listed ELs can be used in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper.
Table B-20 EL Expressions Relevant to the Personalization Conductor
Expression | Function |
---|---|
|
Clears the state of the context object in which it is invoked. Other examples: #{p13nContext.conductor['ConductorConnection'].reset} #{p13nContext.conductor['ConductorConnection'].namespaces['MyNamespace'].reset} #{p13nContext.properties['PropertiesConnection'].namespaces['MyNamespace'].setDefinitions['MyPropertySetDefinition'].set['MyPropertySet'].reset} |
|
Updates the property set with new values if bound to a form. The |
|
Retrieves the results of the context object. In the case of In the case of Other examples: #{p13nContext.conductor['ConductorConnection'].namespaces['MyNamespace'].scenario['MyScenario'].results} #{p13nContext.conductor['ConductorConnection'].namespaces['MyNamespace'].scenario['MyScenario'].withInput['input1=val1;input2=value2;input3=value3'].results} |
|
Executes a scenario by name. |
|
Executes a scenario by name with input parameters. Input parameters must be in the following format: <paramOne>=<valueOne>;<paramTwo>=<valueTwo>;<paramThree>=<valueThree> Where each parameter name and value is separated by semicolon. The |
|
Determines if an error has occurred in the current context object. The Other examples: #{p13nContext.properties['PropertiesConnection'].namespaces['MyNamespace'].setDefinitions['MyPropertySetDefinition'].set['MyPropertySet'].isError} |
|
Returns the error message if an error has occurred in the current context object. The errorMessage method applies only to Other examples: #{p13nContext.properties['PropertiesConnection'].namespaces['MyNamespace'].setDefinitions['MyPropertySetDefinition'].set['MyPropertySet'].errorMessage} |
Table B-21 lists EL expressions relevant to the Documents service and describes the types of functionality it provides. The Context column indicates whether the expression can be used in a WebCenter Spaces context (WCS) or in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper (Both).
Table B-21 EL Expressions Relevant to the Documents Service
Expression | Function | Context |
---|---|---|
|
Provides information on the Space's documents. Returns a bean that provides access to documents-related information for the Space. |
WCS |
|
Provides information about the current user's documents. |
WCS |
|
Gets the default content repository connection name. Returns |
Both |
|
Provides a way to look up a given Space's documents information by the Space's GUID. Returns a bean that provides documents-related information for the Space. |
WCS |
|
Provides a way to look up a given Space's documents information by the Space's name. Returns a bean that provides access to documents-related information for the Space. Enter the Space internal name. The Space internal name is the name specified by the Space URL on the General page of a Space's administration settings. The Space display name is specified by Display Name, and is the name that appears in the banner at the top of a Space. Many of the EL expressions in Table B-14 call for the Space internal name. |
WCS |
|
Provides a way to look up user documents information by user name. Returns a bean that provides access to documents-related information for the user. |
WCS |
|
Checks whether the Documents service is configured. Returns |
Both |
Table B-22 lists EL expressions relevant to the Profile feature of the People Connections service and describes the types of functionality it provides. All listed ELs can be used in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper.
Note:
The entrysecurityContext.userName
, included in every Profile expression, returns the name of the current user. Note also that information is returned only if it is present in the user's profile. If the information is not included in the profile, a null value is returned.Table B-22 EL Expressions Relevant to the People Connections Service (Profile)
Expression | Function |
---|---|
|
The display name of the specified user's manager if the current user is allowed to know it. |
|
The specified user's employee number if the current user is allowed to know it. |
|
The post office box number associated with the specified user if the current user is allowed to know it. |
|
The time zone in which the specified user's home office is located if the current user is allowed to know it. |
|
A description of the specified user (from Profile "About Me") if the current user is allowed to know it. |
|
The department to which the specified user belongs if the current user is allowed to know it. |
|
The specified user's business pager number if the current user is allowed to know it. |
|
The city in which the specified user is located if the current user is allowed to know it. |
|
The specified user's surname or last name before marriage if the current user is allowed to know it. |
|
The specified user's business fax number if the current user is allowed to know it. |
|
The specified user's date of hire if the current user is allowed to know it. |
|
Additional information appended to the user's name, such as |
|
The specified user's middle name if the current user is allowed to know it. |
|
The specified user's home phone number if the current user is allowed to know it. |
|
The specified user's employee type classification, for example, |
|
The specified user's surname or last name if the current user is allowed to know it. |
|
The specified user's birthday if the current user is allowed to know it. |
|
The state in which the specified user's home office is located if the current user is allowed to know it. |
|
The specified user's home street address if the current user is allowed to know it. |
|
The street on which the specified user's home office is located if the current user is allowed to know it. |
|
The specified user's postal or ZIP code if the current user is allowed to know it. |
|
The specified user's initials if the current user is allowed to know it. |
|
The specified user's first name if the current user is allowed to know it. |
|
The organizational unit to which the specified user belongs, for example, |
|
The specified user's wireless account number if the current user is allowed to know it. |
|
The specified user's business telephone number if the current user is allowed to know it. |
|
The country in to which the specified user is assigned if the current user is allowed to know it. |
|
The specified user's preferred language if the current user is allowed to know it. |
|
The specified user's display name if the current user is allowed to know it. |
|
The specified user's actual name if the current user is allowed to know it. |
|
The specified user's job title if the current user is allowed to know it. |
|
The specified user's business email address if the current user is allowed to know it. |
|
The organzation to which the specified user belongs, for example, |
|
The specified user's cell or mobile phone number if the current user is allowed to know it. |
|
The specified user's business expertise if the current user is allowed to know it. |
Table B-23 lists EL expressions relevant to user preferences and describes the types of functionality they provide. All listed ELs can be used in both WebCenter Spaces and custom portal applications built with Oracle JDeveloper.
Table B-23 EL Expressions Relevant to User Preferences
Expression | Function |
---|---|
|
Returns the time zone the current user has selected in application Preferences. For more information, see Section 35.3, "Setting Date and Time Preferences." |
|
Returns the date format the current user has selected in application Preferences. For more information, see Section 35.3, "Setting Date and Time Preferences." |
|
Returns the current user's preferred date format pattern if it has been set, else, returns Note that date + pattern is applicable only to custom WebCenter applications, where they take precedence over date + style if they are set. |
|
Returns the time format the current user has selected in application Preferences. For more information, see Section 35.3, "Setting Date and Time Preferences." |
|
Returns the current user's preferred time format pattern if it has been set, else, returns |
|
Returns the current user's preferred date and time format pattern if it has been set, else, returns |
|
Returns the current user's preferred accessibility mode (either |
|
The current user's preferred skin name if one is specified, otherwise the default value. |
|
Returns the current date in the current user's selected locale. |
|
Returns the current time in the current user's selected locale. |
|
Returns the current date and time in the current user's selected locale. |
|
Returns the name of the ADF Faces skin family being used for the current web request, depending on factors such as what has been configured at the application level, the current user's preference setting, and so on. |
Table B-24 lists utilitarian EL expressions and describes the types of functionality it provides.
Table B-24 Utilitarian EL Expressions
Expression | Function |
---|---|
|
Returns the current date in the format specified in the current user's preferences. |
|
Returns a truncation of the string specified as |
|
Both of these expressions return the request locale (that is, the browser locale setting). |
|
Returns true if current application page is in Oracle Composer mode. Returns false if current application page is not in Oracle Composer mode |
|
Returns the current application skin family. Returns the same value as |