Binding a Security Role to a Control
Before you can bind an application security role to a control, you must create the security role. For more information on creating a security role, see
Add a Security Role to a Portlet Application or
Add a Security Role to a Web Application.
The binding expression #{securityRoles["role1"]} resolves to true if the user is a member of the privileged role. You can build the logic to fit your needs for the view such as #{securityRoles["role1"] and securityRoles["role2"]or securityRoles["role3"]}.
To bind a security role to a control
1. In the UI Development perspective of an opened Composite Application Framework project, drag a control to the view in the design canvas.
2. In the design canvas, select the control and then on the General tab in the Properties view, set the Rendered property to true.
3. Click the Bindings view, expand Implicit Variables, select the security role from the Application Security Roles node or the Portlet Security Roles node, and drag the security role to the control in the design canvas.
4. Select the control in the design canvas, click the Properties view, and then click the Value tab.
5. Verify that the security role is set as the value in the control.