Skip to main content

Posts

Showing posts from August, 2018

Oracle ADF - Dialog skinning / Modern Dialog with a simple form

Lets see how to style af:dialog in oracle adf. We usually use dialog within a popup. The default dialog without any style looks like below in alta skin If you want to play with the styles of dialog to make it as a plain dialog without header and footer, you can use the component level selectors like below af|dialog{     background-color: #454d54;     border:none ; } af|dialog::header-start,af|dialog::header-end,af|dialog::header,af|dialog::footer-start,af|dialog::footer-end,af|dialog::footer{     display:none; } af|dialog::content,af|dialog::content-start,af|dialog::content-end{     border-top:none; } you can use these selectors according to your need with the above styles the dialog would look like below In addition to the css above, i have updated few things in the jspx page to make it look better with buttons aligned and form aligned to the center along with some styles for the buttons (style for buttons can be found he...

Oracle ADF - button skinning / button style

How to style a commandButton in Oracle ADF Normally buttons looks like below in the alta-ui skin If you want to style your button to look like bootstap buttons (most of the morder sites use bootstrap like buttons nowadays), you can use component selectors to skin af:commandButton component. Example style classes are below /***************** Button style start **********/ af|commandButton.success{     background-color: #4dbd74;     background-image: none;     border-radius : 5px;     border : 1px solid #3ea863;     color: white;     text-shadow : none; } af|commandButton.success:hover{     background-color: #3ea863;     background-image: none;     border-radius : 5px;     border : 1px solid #3ea863;     color: white;      text-shadow : none; } af|commandButton.warning{     background-color: #ffc107;     background-im...

Oracle ADF - Table pagination problem from JDeveloper 11.1.1.7

Most of us would have tried to implement pagination on af:table From Jdeveloper 11.1.1.7, pagination feature is directly available for af:table with a property called "scrollPolicy". We need to have two properties in af:table scrollPolicy="page" autoHeightRows="0" Once this is set the pagination feature should be shown.But table pagination does not show up, until unless we have a floating layout around the table. When we try this, we will get a message in the log saying below falling back to scrolling mode since we need parent component to flow and authHeightRows=0 Logs looks as below This is because of the layout around the table. The table should be in a container in flow mode. For example panelGroupLayout or showDetailHeader. So the af:table should be surrounded with a panelGroupLayout When you surround table with panelGroupLayout, set the layout to "horizontal",or "vertical",or "scroll" . Because w...

Maven - Path to the driver executable must be set by the webdriver.chrome.driver system property

When we try to run TestNG or JUnit tests with maven, we usually face this exception saying java.lang.RuntimeException:java.lang.IllegalStateException: The path to the driver executable must be set by the webdiver.chrome.driver system property For this the chrome executable driver file should be available in the classpath. You can add the chrome driver to the classpath of the current project. But if you want to configure the same in a maven pom file, you should do the following. To execute TestNG or JUnit test cases, we use maven-surefire-plugin. We can configure the path to the chrome driver as a configuration parameter in this plugin as shown below <build>         <!-- Source directory configuration -->         <sourceDirectory>src</sourceDirectory>         <plugins>             <!-- Following plugin executes the testng tests -->     ...

Oracle ADF - show or hide popup programmatically

Objective here is to open popup from backing bean . You can bind the af:popup like below     <af:popup id="p1" contentDelivery="immediate"               clientComponent="true"               binding="#{backingBeanScope.employee.myPopup}" > Then in java you can use the myPopup to hide and show the popup  private RichPopup myPopup ;//bound to the UI component  public void showOrHidePopup(RichPopup popup,Boolean visible){  if(visible){  RichPopup.PopupHints hints = new RichPopup.PopupHints();    myPopup.show(hints);  }  else{   myPopup.hide();  } That's all, Now you can call this method from any events like actionListener of a commandLink

Oracle ADF - Menu Skinning

Let's see how to style menu in oracle adf I assume that you have a page with menus like below The default style for the menu with alta ui theme looks like below If you want to change the look and feel of the menu, then we need to add few component level style selectors. I assume that you have a css file ready to put the custom styles that we are going to use.With the below seectors you can play around to change the look and feel /*menu hover*/ af|menu:hover{ border : 1px solid rgb(0,198,198) ; background-color: white; } /*menu hover --> menu text hover*/ af|menu:hover af|menu::bar-item-text:hover{     color: rgb(0,205,205);   } /*menu pressed*/ af|menu:depressed{ border : 1px solid rgb(0,198,198) ; background-color: rgb(0,205,205); color: White; } /*menu pressed and hover --> menu text hover, menu pressed --> menu text*/ af|menu:depressed:hover-target af|menu::bar-item-text, af|menu:depressed af|menu::bar...