
Oracle E-Business Suite R12 Integration and OA Framework Development and Extension Cookbook
By :

SPEL stands for Simplest Possible Expression Language. A SPEL statement will return a Boolean value of either True
or False
and can be used for conditionally setting a property of an item on a page.
In this recipe, we are going to use SPEL to set the properties of an item. We are going to set the Read Only property based on a SPEL statement. If the SPEL statement returns True
, the item will be made read only to the user.
To set properties using SPEL, perform the following steps:
Log in to Oracle with XXUSER
and select the XX Test Manager Self-Service responsibility.
Navigate to the Absence Management page.
Click on the Action icon for an employee record.
Click on the Create Absence button.
Click on the Personalize Page link.
Click on the Complete View radio button.
Click on the Expand All link.
Press Ctrl + F to bring up the search facility on the browser.
Type in Comments
and scroll down to the Message Text Input: Absence Comments record (which will be highlighted from the find).
Click on the Personalize icon.
Click on the Choose Levels Displayed button.
Shift all of the items other than Site and Responsibility back to the Available Levels side.
Click on the Apply button.
Set the Read Only property at the Responsibility level to SPEL.
Set the Responsibility level for the SPEL statement to ${oa.FunctionSecurity.XXABSREADONLY}, as shown in the following screenshot:
Click on the Apply button.
Scroll down to the bottom of the page and click on the Return to Application link.
You may notice that the comments item is now not displayed on the screen. This is because we need to create the function and add it to the menu for the SPEL condition to be returned.
We are now going to create a function that we will add to a menu.
To create a function, perform the following steps:
Log in to Oracle with XXUSER
and select the Application Developer responsibility.
Navigate to Application | Function.
Create a function with the following details:
Item name |
Item value |
---|---|
Function |
|
User Function Name |
|
Description |
|
Type |
|
The function will be displayed as shown in the following screenshot:
Save the record and dismiss the confirmation message.
We will now add a function to a menu attached to the XX Test Manager Self Service responsibility. The function will be present in the menu, which will mean that the SPEL statement will return True
.
To add a function to a menu, perform the following steps:
Log in to Oracle with XXUSER
and select the Application Developer responsibility.
Navigate to Application | Menu.
Query back the Manager Self Service menu.
Add the function XXABSREADONLY to the menu with the following details:
Item name |
Item value |
---|---|
Seq |
|
Function |
|
Save the menu and dismiss the confirmation message to compile the menu.
We can see that the function has now been added to the menu as shown in the following screenshot:
Change the font size
Change margin width
Change background colour