Using multiple skins in an ADF application

ADF By May 06, 2013 No Comments

To use multiple skin files in an ADF application, follow the below procedure. Create different css files for the application. (In this example, I have created css files under the folder css) Configure all these skins in trinidad-skins.xml file. The file would be like below <?xml version=”1.0″ encoding=”windows-1252″?> <skins xmlns=””>   <skin>     <id>skin.desktop</id> <family>abc</family> <extends>blafplus-medium.desktop</extends> <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id> <style-sheet-name>css/style.css</style-sheet-name>      </skin>…

Adding Custom Skins to the application

ADF By Apr 19, 2013 No Comments

If you want to add your own style files (CSS files) to a ADF application, please follow the below steps. Create css file under the webcontent folder (css can put under subfolder also) Create a trinidad-skins.xml under WEB-INF folder and create the content like below <?xml version=”1.0″ encoding=”windows-1252″?> <skins xmlns=””>   <skin> <id>skin1.desktop</id> <family>skin1</family> <extends>blafplus-medium.desktop</extends> <render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id> <style-sheet-name>skins/style.css</style-sheet-name> <bundle-name>resources.skinBundle</bundle-name>   </skin>…

How to display a message dialog on the JSF page

ADF By Feb 06, 2013 No Comments

The below code will be used to display a message dialog on the JSF page.         FacesContext facesContext = FacesContext.getCurrentInstance();         FacesMessage facesMessage = new FacesMessage(message); facesMessage.setSeverity(severity); facesContext.addMessage(null, facesMessage); Where message is the message what we want to display on the dialog box and severity is to show the severity of the message. Example for severity is FacesMessage.SEVERITY_INFO which displays…

Creating GraphDataModel object for pieGraph

ADF By Feb 06, 2013 No Comments

When creating a dvt:pieGraph, an object of GraphDataModel class needs to be passed as input to it. The below code helps to understand how to create GraphDataModel object. In the below code, I am taking data from database.     public static GraphDataModel getGraphDataModel(String table,                                                                                                     String cust_id) throws Exception {        String[] columnLabels = { “” };         String[] columnNames…

Accessing Session Scope and Request Scope objects in ADF

ADF By Jan 22, 2013 No Comments

We can access the session Scope objects in ADF by using ADFContext class. The syntax for this is: ADFContext.getCurrent().getSessionScope().get(obj); Where obj is the object name configured in the session scope. In the same way, we can also access the objects in request scope by using the below syntax: ADFContext.getCurrent().getRequestScope().get(obj);

Fetching values of a list object of ADF bindings from Java

ADF By Jan 16, 2013 No Comments

Before giving the solution, let me explain my scenario. I have JSF binding object “internalProfile” which is a list of a class. The definition of the object is like below. List<KeyValue> internalProfile=new ArrayList<KeyValue>(); KeyValue is a bean with two String properties key and value. A binding is created for the “internalProfile” and input fields are created for its values as…

Invoking Application Module from Java

ADF By Jan 09, 2013 No Comments

Below code snippet will allow us to access the application module from java class. In this code, I was trying to get records from the table. For this, I have got the view object from the application module and applied a view criteria on the view object through which I got the records row. /*Accessing Application Module*/         AppModuleImpl appModule…

Invoking actions before loading the JSF or JSFF page

ADF By Jan 09, 2013 No Comments

If we want to invoke the operations like Create or CreateInsert of a data control while loading the page, we can achieve this by doing below Open JSF or JSFF page, go to bindings tab In the “Executables”, click on “+” symbol to add, select InvokeActions options from the given list Enter some ID to the action and select Binds…

Hi, Welcome here.
And get notified everytime we publish a new blog post.