Sun. Oct 24th, 2021

Requirement: I have home.jspx page. In home.jspx I will have a banner “Welcome to the Home Page“, the logged in UserName ansd the Logout link.

Also, in home.jspx page, I have an Employee table display the Employees data. Now we should be able to hide/show columns of the table. If we want we should be able to order the position of the columns as well.

Now, when we logout of the session and try to Login with the same credentials, we should see the same changes the same user made in his previous session.

When the user Login with some other credentials those changes that was made by the previous should should not be visible to him.

Solution: For solution to the above requirement we will extend the workspace that we have created as a part of “Implement Security in Oracle ADF” post, as we need to have security if we want to apply Metadata Services.

Various steps that are required for solutions are given below:

Step 1: Open an Oracle ADF Fusion Web Application ADFSecurityDemo.

Step 2: Create an ADF Business Components from Table (Employees) . The ADF Business Component should have EmployeesEO, EmployeesVO, and AppModule.

Step 3: Open home.jspx page.

Click Data Controls > Expand AppModuleDataControl > Select Employees1 and drag and drop it on home.jspx as ADF Table.

Select Row Selection as Single, Check Enable Sorting, Check Enable Filtering, Check Read-Only Table and then click OK as shown below:

Step 4: Double click ViewController project of the ADFSecurityDemo > Click on ADF View > Check Enable User Customizations > Select Across Sessions using MDS > Click OK.

Step 5: Surround the af:table with af:panelCollection and set styleClass=”AFStretchWidth” for the af:panelCollection

Step 6: Expand Application Resources > Descriptors > ADF META-INF > Open adf-config.xml file as shown below:

Click MDS > Click the green (+) icon beside Customization Configuration: Match Path = “ / “ > Add UserCC class > Click OK as shown below:

Click View > Select Tag Library under Tag Persistance as ADF Faces Components > Add Components as column and table as shown below:

Step 6: Save all and run login.jspx page. Thus, the ran application is shown below:

Give the UserName as Susanto and Password as welcome1 and click on Login button. On successful Login we will land in the below home.jspx page.

Click View > Columns > Deselect FirstName and HireDate as shown below:

Drag and drop Email as the first column as shown below:

Logout to close the session and Login again with the same credentials. Thus we can see that whatever changes we have done in the previous session is persistence in the new session. That means the layout is saved for the user Susanto.

Logout and try to Login with the UserName as Moumita and Password as welcome1. Thus, the home.jspx page will look as below:

Thus, we can see that whatever changes we did for User Susanto is not persistent for the User Moumita.

Hence, the solution to our requirement.

If you like the post please comment, share, and do join me on Facebook. Please subscribe to my YouTube Channel for video tutorials.

Thanks & Regards,
Susanto Paul

 566 total views,  3 views today

By Susanto Paul

Susanto is an Oracle ACE, a qualified MCA, MBA, and a highly-skilled Senior Oracle Specialist. He is an enthusiastic Blogger and YouTuber who helps learners to solve their complex problems more efficiently. He has 9+ years of experience in multiple technologies like AWS, Oracle ADF, Oracle APEX, Oracle JET, Oracle VBCS, Oracle IDCS, Oracle PL/SQL, Oracle Integration Cloud, Java, JDBC, Servlets, JSP, Spring, Hibernate, HTML5, CSS3, JavaScript, TypeScript, NodesJS, Angular, MySQL, Oracle WebLogic Server, JUnit, JMeter, Selenium Web Driver, etc. He is a certified: Oracle Certified Professional Java SE 6 Programmer, Oracle ADF 11g Certified Implementation Specialist, Oracle Cloud Platform Application Integration 2020 Certified Specialist, Oracle Cloud Infrastructure Foundations 2020 Certified Associate, and Oracle Cloud Infrastructure Developer 2020 Certified Associate

Leave a Reply

Your email address will not be published. Required fields are marked *

satta king chart