Tuesday Jul 12, 2016

Configure ADF Skin in JDeveloper 11.1.1.7 by Ashish Awasthi


clip_image002

In Jdeveloper 11.1.1.7 there is no option to create ADF Skin declaratively
In order to apply skin we have to create a simple CSS file and then configure application to use this CSS file as skin. Jdeveloper doesn't do this for us clip_image003we have to do it manually
So first step is to enable Skin Selectors for ADF Faces, Without enabling this CSS editor doesn't show ADF Faces component tags
CSS files by default supports HTML tags  only
Go to Tools > Preferences > CSS Editor and set CSS level to level 3 and check the box to support ADF Faces Components

Now create a CSS file -
Right Click on View Controller project > Select New > Web Tier > HTML > CSS File

Provide a name for CSS file and click OK. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Saturday May 14, 2016

Consuming a SOAP Web Service quickly using Web Service Data Control (WSDL) in ADF by Ashish Awasthi


clip_image001Creating and Consuming Web Servie is an important part development cycle . In earlier posts i have described about creating SOAP/REST Web Service
Create REST Web Service with Application Module declaratively in ADF 12.2.1
Create SOAP Web Service with Application Module quickly in ADF 12.2.1
Now this post is about consuming a SOAP Web Service. A very simple way to consume Web Service is to create Web Service Data Control (WSDL) for external Web Service URL
Here i am using a Country-Currency Web Service (http://www.webservicex.net/country.asmx) to create WSDL

  • Create a Fusion Web Application with default Model and ViewController project
  • Right click on Model project , Select New--> From Gallery--> Business Tier--> Web Services and select Web Service Data Control SOAP/REST 
  • It opens WSDL creation wizard , First Step is to provide Web Service Name and URL. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Wednesday May 11, 2016

Add and delete values in POJO based selectOneListbox/selectOneChoice in ADF by Ashish Awasthi

clip_image001Previously i have posted about populating selectOneChoice programmatically using POJO
Programmatically populate values in a af:selectOneChoice component in ADF
In same way we can populate values in selectOneListBox as both ADF Faces components are used for single selection and share same structure
Here i have used a List to populate values in selectOneListBox (For details read complete article in above link)
And to get selected value from af:selectOneListBox/selectOneChoice in bean- Used a String variable , created it's accessors

And see here how both List and String variable are bound to af:selectOneListBox. Read the complete article here.


WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Tuesday Apr 19, 2016

Create SOAP Web Service with Application Module quickly in ADF 12.2.1 by Ashish Awasthi

clip_image001

SOAP stands for Simple Object Access Protocol, a protocol to exchange information in XML format between two applications over HTTP. This protocol is used to create ,access and consume web services.
SOA (Service Oriented Architecture) focuses on re-usability and exposing application module as web service makes it's methods and objects accessible from any device , any platform and these methods and objects can be further used by any other application
In ADF 12.2.1 we can create a SOAP web service within seconds , See how to configure Application Module to expose it's methods and objects to service interface

  • Created a Fusion Web Application using Departments and Employees table of HR Schema
  • Open Application Module and Web Service tab, there is a separate tab for SOAP , click on green plus icon
  • Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Saturday Apr 16, 2016

New look of dvt:pieChart as donut chart for Data Visualization in ADF 12.2.1.0 by Ashish Awasthi

clip_image001Oracle Jdeveloper 12C (12.2.1.0) documentation tells about a new enhancement in look of pie chart
We can now design donut chart using dvt:pieChart , innerRadius property allows us to create donut chart look on the base of default pie chart.
Donut chart is nothing just a variation of pie chart that show data in sections of a circle, I believe everyone knows how to design a pie chart in ADF Faces
I have dropped a viewObject (it has Department wise Salary detail) as pie chart on page and default pie chart looks like this
Now to change it's look to donut chart , just change in some properties
InnerRadius  property creates donut look , SliceGaps  is the gap between slices and CenterLabel  is the text shown in center. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Monday Dec 14, 2015

ADF Basics: Reorder ADF table column using DisplayIndex property by Ashish Awasthi


clip_image001This post is about a very simple use case that is reordering of af:table column at run time.

Ordering of columns in af:table is controlled by DisplayIndex property of af:column
Check what docs says-
Default Value: -1
The display order index of the column. Columns can be re-arranged and they are displayed in the table based on the displayIndex. Columns are sorted based on the displayIndex property, columns without displayIndex are displayed at the end, in the order in which they appear. The displayIndex attribute is honored only for top level columns, since it is not possible to rearrange a child column outside of the parent column.
Not supported on the following renderkits: org.apache.myfaces.trinidad.core

We can set DisplayIndex property for all columns in a sequence (1,2,3 etc) that we want to see on page
Here i am using a HashMap to change DisplayIndex of columns at runtime
Let's see implementation part-

  • Prepare Model using Departments table of HR Schema and dropped viewObject as table on page

  Page structure window. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Thursday Dec 10, 2015

ADF Basics: Call PL/SQL Stored function in ADF Application by Ashish Awasthi

clip_image001

This post is about calling stored function in ADF Application , a very basic requirement. Many times we need to call a PL/SQL function in ADF app for any specific requirement.
In this post i am discussing same so for that i have created a PL/SQL function that takes EmployeeId as input parameter and return it's Employees Name (Using Oracle HR Schema)
I have a ready to use helper method to call PL/SQL function, Check it Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Tuesday Nov 10, 2015

Showing HashMap values in af:table using af:iterator by Ashish Awasthi

clip_image002Previously i have posted about populating af:table programmatically using List Data Structure
Populate af:table programmatically from managead bean using POJO
This post covers same topic but this time requirement is different , we have a HashMap in managed bean and requirement is to show it's values on page in a table view
See Managed Bean code- Added two inputText on page and a button to add new key and value to HashMap, Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Sunday Nov 08, 2015

Apply Validator to programmatically created ADF Faces components by Ashish Awasthi

clip_image002

Again a post in series of  Working with ADF Faces Components programmatically
Previously i have posted about Getting value , Applying Action Listener , Applying Client/Server Listener, Creating and applying client Attributes, Setting value expression  to programmatically created component
Now this post post is about applying Validator to a component that is created at run time
See how to do this (Jdev 12.1.3)-

  • First created a FusionWebApplication and a page in viewController project
  • Dropped a button on page , on this button action i will create an inputText programmatically and assign validator method reference to it
  • To create new inputText i have added following code (described in previous post)
  • Read the complete article here

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Tuesday Oct 06, 2015

Get selected row (single/multiple) from POJO based table in ADF by Ashish Awasthi

clip_image001Previously i have posted about populating af:table from managed bean using POJO and adding records in it, Check this- Populate af:table programmatically from managead bean using POJO
In this post i am extending previous post application
This post is about getting selected row from POJO based table , It is a common requirement while using af:table based on POJO

Get single row using custom selection listener-

SelectionListener  handles selection event of table , whenever user selects a row in table ,selection listener is fired
Set table RowSelection property to single (to select one row at a time) or multiple (to select multiple row ) and create a custom selection listener in managed bean that will handle table's selection event. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Monday Oct 05, 2015

Get selected row (single/multiple) from POJO based table in ADF by Ashish Awasthi

clip_image001Previously i have posted about populating af:table from managed bean using POJO and adding records in it, Check this- Populate af:table programmatically from managead bean using POJO
In this post i am extending previous post application
This post is about getting selected row from POJO based table , It is a common requirement while using af:table based on POJO

Get single row using custom selection listener-

SelectionListener  handles selection event of table , whenever user selects a row in table ,selection listener is fired
Set table RowSelection property to single (to select one row at a time) or multiple (to select multiple row ) and create a custom selection listener in managed bean that will handle table's selection event. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Saturday Oct 03, 2015

Create shortcut of page on a button click in Oracle ADF using JShortcut library (For windows) by Ashish Awasthi

clip_image001This post is about a small trick to create shortcut file from ADF application
Actually this type of requirement doesn't come in picture when you are working in web application , for web application bookmarks replaces desktop shortcut
Still if you want to do this then you can follow approach mentioned in this post
Creating shortcut programmatically requires access of operating system but you need not to worry about that
There is a java library to do this for you - JShortcut
Download jar files from here..
1. Now first step is to create a fusion web application and add this jar to viewController project

2. Create a page (independent runnable like jspx or jsf not fragments) and drop a button in that
3. Create a managed bean to handle button's action
    Here we will make use of JShellLink class of this library
See what docs says about this -
Provide access to shortcuts (shell links) from Java. The native library (jshortcut.dll) is loaded when JShellLink is first loaded. By default, JShellLink first looks for the native library in the PATH, using System.loadLibrary. If the native library is not found in the PATH, JShellLink then looks through each directory in the CLASSPATH (as determined by the value of the system property java.class.path). If an entry in the CLASSPATH is a jar file, then JShellLink looks for the native library in the directory containing that jar file. The application can override this behavior and force JShellLink to look for the native library in a specific directory by setting the system property JSHORTCUT_HOME to point to that directory. This property must be set before the JShellLink class is loaded. This makes it possible to use this library from a self-extracting jar file. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Sunday Sep 06, 2015

Insert and show whitespace in ADF Faces Components (panelBox, showDetailItem etc) by Ashish Awasthi




clip_image001This post is about a small trick
How to show whitespace in ADF Faces component properly ?
Recently i found a question on OTN about this
How can I and spaces in the text property of a showDetailItem?
so thought to document it here for future reference
There is one more post about showing whitespace , check it
Showing white-spaces properly in ADF table column- 11g & 12c
Sometimes we need to insert some whitespace in between of some text as panelBox name, tab name in showDetailItem etc. In this case space appears in page editor but it doesn't appear on page and you can not put spacer at these points because there is only one component
Suppose you have a panelBox and requirement is to show Oracle    ADF as it's header text . In this case providing space in propertyInspector doesn't work , HTML entity for space also doesn't work because of no DOCTYPE declaration. See here i added normal spaces in property of panelBox. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Friday Sep 04, 2015

ADF Basics: Using contentStyle and inlineStyle property to change basic styling of component in ADF Faces by Ashish Awasthi

clip_image001

Again a post about ADF Basics for beginners
I have seen lots of thread on OTN about changing basic styles of component . for example,
How to change font size of inputText ?
How to change color of inputText/outputText ?
How to change color of link or button ?
and everyone starts creating a css/skin for these minor changes but there is no need of that
Skin should be used for complex styles or you have apply same style to all components of your application. If you will read API docs then you will know this, See what docs says about inlineStyle property.
The CSS styles to use for this component. This is intended for basic style changes; you should use the skinning mechanism if you require any complex style changes. The inlineStyle is a set of CSS styles that are applied to the root DOM element of the component. Be aware that because of browser CSS precedence rules, CSS rendered on a DOM element takes precedence over external stylesheets like the skin file. Therefore skins will not be able to override what you set on this attribute.

Difference between contentStyle and inlineStyle -

contentStyle property used to style content part of component like if you want to change color of inputText or any other input component then you have to specify this in contentStyle property of that component
inlineStyle is about whole component and also available in output (outputText) or collection (table, tree etc) component's property where contentStyle is not there. This can be use to set width, height ,border or color of output components etc. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Sunday Aug 02, 2015

Programmatically Select all values in ADF BC based selectMany (af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle) component by Ashish Awasthi

clip_image002

Previously i have posted a lot about component that supports multiple selection in ADF Faces (af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle)
- Multiple Selection in ADF Faces
This post is about selecting all values in a component programmatically on a event like button click, value change event etc.
Note that this post is designed for ADF BC (viewObject) based components , to set values in bean based component check this-
Programmatically populate values in ADF Faces multiSelect component (af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle)
So for this i have just dropped Departments viewObject as multiSelect component on page
(af:selectManyCheckbox, af:selectManyChoice, af:selectManyListbox, af:selectManyShuttle)

Page bindings section looks like this-Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Search

Archives
« July 2016
SunMonTueWedThuFriSat
     
27
28
29
30
31
      
Today