Posts Tagged ‘ADF Faces’

image

This post is about another use of af:iterator component, When we show Employees ViewObject data as a chart then all Employees appears in a single chart but if requirement is to show separate chart for each department See how can we do it

Here I am using Departments and Employees table of HR Schema, Prepare model using both tables, Default view link is created between departments and employees view object (using department Id)

Here I am going to show employees chart department wise so dropped Departments view object as selectOneChoice on page and created chart using Employees viewObject to show Employee’s salary and commission

To create bar chart-

Select Employees viewObject from data control and drop on page as chart 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

Advertisements
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

 

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

 

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

 

clip_image002This post is next in series of "Working with ADF Faces Components programmatically"
So this post is about creating client Attribute, applying it to component and setting it’s value programmatically
this requirement comes in picture when user is dealing with dynamic layout means components are created programmatically at run time and it is not possible to apply clientAttribute and other properties declarative
In this i am extending my previous post –
Apply Client/Server listener to programmatically created components, apply JavaScript to ADF Faces components at run time
In previous post i have described about applying client listener and server listener programmatically
here we will see how to pass a variable value to java script function using client attribute
You can read more about af:clientAttribute here
From oracle docs-
The clientAttribute tag specifies the name/value for an attribute which will both be made available both on the server-side (Faces) component as well on on the client-side equivalent. This tag will be ignored for any server-rendered components, as it is only supported for the rich client. ClientAttributes are not synchronized to the server since unknown attributes from the client are not synchronized to the server.
Lets’ see how we can do this ,It’s simple just check this code 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

 

clip_image002You might have noticed that I am working on a series of blog articles on using Selenium to automate testing of Oracle ADF applications. This includes work on a little framework to make this easier and a set of sample JUnit tests against the public Oracle ADF Faces 12c Components Demo.
Getting the Faces 12c Component Demo running with test automation had some challenges. I wanted to write them down here in case somebody wants to try the same. It starts by downloading the Oracle ADF Faces Components Demo from OTN. This also includes instructions on how to run this application in your integrated weblogic server, but those instructions have some caveats and are for JDeveloper 11g, not version 12c. Please follow the instructions below as an alternative (I’ve marked the differences with the normal Oracle instructions and included screenshots at the end).
In the end this needed more work than I expected, so I offer the fixed version for download. If anyone from Oracle feels that this is a problem please contact me and I’ll remove the download and you can follow the instructions below to create your own fixed version.

Download the ADF Faces 12c Components Demo WAR file, but don’t unpack it.

Start JDeveloper 12.1.3

Instructions updated from 11g: Choose File > From Gallery from the menu to create a new application. Select General > Applications in the tree and select Custom Application as application type and press Ok.

In the Create Application dialog type adffacesdemo as the application name, select a directory, leave the rest of the options alone and press Finish. This creates new application workspace and project.

Instructions updated from 11g: The default created project is not needed and you may delete the project. Right click it and select Delete Project. In the subsequent dialog choose to not only delete the project form the application but also delete it from disk.

Instructions updated from 11g: In the now empty workspace choose File > From Gallery from the JDeveloper menu. In the list of items select Projects and on the right hand side Project from WAR and press Ok. In the next dialog provide a name for the project, e.g. adffacesdemo, and keep the directory information. On the second panel, use the file browser to select the downloaded ADF Faces demo WAR file and finish the wizard.

Double click onto the project node to open the project properties and select the Run > Debug > Profile option. Press the Edit button and select the Tool Settings. In the Before Running section, uncheck the Make Project and Dependencies option and close the dialog pressing 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