OIM11gR2: ADF: Frequently used EL expressions

Category

Usage

EL [Expression Language]

User

Get the current user’s attribute value by passing the attribute name

#{oimcontext.currentUser['ATTRIBUTE_NAME']}

User

Similarly get the value for a UDF

#{oimcontext.currentUser['UDF_NAME']}

User

Gets the roles assigned to current user. Returns list of RoleEntity objects. It is a Java Bean having name, description, key, and displayName properties

#{oimcontext.currentUser.roles}

User

Return true if user is a system administrator

#{oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] ne null}
 
User

Returns true if user is assigned with admin role

'OrclOIMSystemAdministrator'

#{oimcontext.currentUser.adminRoles['OrclOIMSystemAdministrator'] ne null}
 
User

Returns user key

#{oimcontext.currentUser.usr_key}
 
User

Returns user key

#{oimcontext.currentUser['usr_key']}
 
User

Returns user login

#{oimcontext.currentUser['User Login']}
 
Request

Returns current operation. Possible values: CREATE/MODIFY

#{pageFlowScope.requestFormContext.operation}
 
Request

Returns true if the current operation is Modify

#{pageFlowScope.requestFormContext.operation eq 'MODIFY'}
 
Request

Return the current action type. Possible values: APPROVAL/ FULFILL/ REQUEST/ VIEW/ SUMMARY.

On all approval pages/ approver view the value is APPROVAL

For Manual fulfillment page the value is FULFILL

#{pageFlowScope.requestFormContext.actionType}
 
Request

Returns true if the action type is Request i.e. the user is about to submit the request

#{pageFlowScope.requestFormContext.actionType eq 'REQUEST'}
 
Request

Returns true if the request is bulk

#{pageFlowScope.requestFormContext.bulk}
 
Request

Returns beneficiaries user ids[user login values]

#{pageFlowScope.requestFormContext.beneficiaryIds}
 
Request

Returns keys for cart items

#{pageFlowScope.requestFormContext.cartItemIds}
 
Request

Returns the type of item added to request. Possible values: ROLE/ ENTITLEMENT/ APP_INSTANCE/ USER.

#{pageFlowScope.requestFormContext.requestEntityType}
 
Request

Returns true if added item is Application Instance

#{pageFlowScope.requestFormContext.requestEntityType eq 'APP_INSTANCE'}
 
Request

Returns application instance key for the item added

#{pageFlowScope.requestFormContext.requestEntitySubType}
 
Request

Returns provisioned instance key for a modify type request

#{pageFlowScope.requestFormContext.instanceKey}
 
General

Invoke a method present on backing bean

#{backingBean.<Bean Name>.<bean method>}
General

To show a field disabled on all FULFILL and APPROVAL pages

disabled="#{pageFlowScope.requestFormContext.actionType ne 'REQUEST'}"
Comments:

Hi Shashidhar,
I would enable a menu only to users who have any AdminRoles.
So I specify in the visible parameter the following expression:

#{oimcontext.currentUser.adminRoles ne null}

But it returns always "true".
What is wrong?
Many thanks.
roberto

Posted by guest on January 21, 2014 at 08:17 AM PST #

Please try this

#{oimcontext.currentUser.adminRoles[0] ne null}

Regards
Shashidhar

Posted by guest on January 21, 2014 at 10:08 PM PST #

Thanks.
I also found the following:
#{not empty oimcontext.currentUser.adminRoles}

Best regards.
Roberto

Posted by guest on January 22, 2014 at 12:02 AM PST #

I have a similar question.
I would enable a field "fax" only to users who has a role "Admin01" or "SYSTEM ADMINISTRATORS" .
So I specify in the visible parameter the following expression:
#{ (oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] != null) or (oimcontext.currentUser.roles['Cadastradores'] != null) }
... but does not work!
What is wrong?

Posted by Eduardo on March 18, 2014 at 06:24 AM PDT #

Hi,

I need to create a search button on create user page so that when someone click on button, he can query all users of a perticuler type.

Please let me know the approch.

Posted by Kuldeep on April 08, 2014 at 09:18 AM PDT #

Hi Kuldeep

Do you need a user picker to populate some field on create user page?

For normal user search you can use the OOB search user functionality as well.

Regards
Shashidhar

Posted by guest on April 08, 2014 at 10:40 PM PDT #

Hi Shashidhar,

Thanks for your quick reply, please let me know how we can use that ootb user search. Secondly I need to fiter users by their specific 'employee type' I.e. if I serch a user to be an approver with user login, it should come only if this user is having 'employee type' as employee, if I search a user to be an approver with first name as 'kuldee', only dose kuldee should come in result who are employees.

If my requiement is not clear, please send me your email so that I can send you screen shots to have more clarity.

Posted by kuldeep on April 09, 2014 at 01:38 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

OIM11gR2 Blog by NA-TAG Offshore IDAM team

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today