Saturday, March 27, 2021

Oracle Cloud Infrastructure 2020 Certified Architect/1Z0-1072-20 -EXAM questions/Dump

 HI All,

Recently i passed the exam for Oracle Cloud Infrastructure 2020 Certified Architect. Its tough exam with 60% passing percentage.

Attached are exam dump questions that i got along with answers for each. You will definitely pass the exam with only following the document questions


click link for Dump questions and answers

All the Best :)

Friday, March 12, 2021

ADF table -Achieve case insensitive sort for af:column

 In Oracle ADF when we use sortable="true" on af:column By default sorting will be done case-sensitively ,which means that upper case data will be shown first and then lower case data will shown .As shown in below screenshot






,









To make this work case insensitively , we can use sortStrength="Primary" attribute on af:column as below






Now my work works case insenstive as below.














Please note this works only with 11.1.1.7 and above version

Wednesday, March 10, 2021

Setting NULL value using af:setPropertyListener in ADF

 Usually we come across common requirement to set value of session scope or pageFlowScope variable to NULL on click of adf button or  af:commandLink to do this you can af:setPropertyListener inside af:commandLink as below and use EL as #{null}

<af:commandLink text="Clear">

            <af:setPropertyListener  from="#{null}"

                                                  to="#{sessionScope.userName}"

                                                   type="action"/>

</af:commandLink>


in above case i am setting userName to null.

Tuesday, March 9, 2021

Reset ADF table filters programmatically

Requirement-When we use ADF table i.e af:table with filters on each column ,It is very common requirement to clear filter data and reset table result to its initial state.

One way to do is to add af:column as first column in af:table and set rowHeader="true" attribute in af:column.This will show icon in first column to clear filter and reset table results.


There may be a requirement to do this on click of button which is outside af:table .So in this case add below code in button actionListener.



    public void backActionListener(ActionEvent actionEvent) {

        // Add event code here...

        FilterableQueryDescriptor fqd = (FilterableQueryDescriptor)deleteUserTableBinding.getFilterModel();

                      if (fqd != null && fqd.getFilterCriteria() != null) {

                        fqd.getFilterCriteria().clear();

                        deleteUserTableBinding.queueEvent(new QueryEvent(deleteUserTableBinding, fqd));          

                       

                     }

    }

Note: deleteUserTableBinding is my af:table component binding name.(change as per yours)

This will work as long as you are on same page on click of reset button in my case i call it back button. But if are redirecting to different jsff or jspx on click of your reset button above code will throw error saying binding not found because on the page which you are redirecting to does not have table binding iterators and tree binding .


Solution to solve this problem is go to first page's page defination file and copy tree binding and iterator binding ,now paste this in page defination file of next page which you are redirecting to so when we queue event in above code snippet it will find the required binding and wont throw exception.


Monday, March 8, 2021

ADF table- case Insensitive search on column filter of af:table

when we add table filters to ADF table the filter is case sensitive by default and common requirement is to have case insensitive filter.

Solution for this is very simple -Set af:column attribute filterFeatures="caseInsensitive"


and filter will work case insensitive.

Saturday, March 6, 2021

ADF LOV based dropdown not showing all records

 It is very common requirement to show dropdown with values coming database .In ADF we use Model based LOV dropdown or we drag the View object as af:selectOneChoice in our fragment or jspx page as below



now code that gets generated is as below








When you run this page the dropdown that is shown is just having 10 values as below















Where as in Database  i have 27 department names present .Reason for having 10 records in dropdown is if you go to page definition file of above dropdown page it looks like below and iterator binding of the DepartmentView is having range size as 10










Now to see all records of department names present in database change the range size 

value to -1 and run the page again to see dropdown show all values of department name as below .



Tuesday, March 2, 2021

Change Default look or CSS of ADF button

 Requirement-It is very common requirement in any adf application to change the default color of adf button,adf button text color as per client requirement of UI design.


when we use af:commandButton in 11g or af:button component in 12c it comes with default look as below.









Now requirement is to change the default look to something else as per your project standards so that we dont have to apply inline style each time we use adf button in application.

In my case I converted it to green background color with text color white.

Add below snippet of css in you ADF application css file and run the application again to see new look and feel of default button.


Code Snippet in CSS

.af_commandButton.p_AFTextOnly,

.af_commandButton, button.af_commandButton,button,button:focus,.af_commandButton:focus,.af_commandButton:active:hover,.af_commandButton:focus:hover.af_commandButton:focus:active,.af_commandButton:active:focus{

  background: #40A828 !important;

  text-decoration: none ;

  color:#ffffff !important;

  padding:3px 10px 3px 10px !important;

  border:none  !important;

  border-style: none !important;

  outline:none !important;

  cursor: pointer;

}

New button look will be something like below.Now just just af:commandbutton component anywhere in application and button color will be as below.










you can also have two three types of button css in you application but for that different style class need to be created.