Wednesday, January 6, 2016

Create Deployment Profile ADF (assembly error)

Make sure you check webApp checked for the assembly
Reference: screenshots

Wednesday, December 30, 2015

StrikeThrough output text /Outputformatted text ADF

update the css with below code

.strikethrough {
    text-decoration: line-through;
}

use 'strikethrough' in the styleClass of output text/outputformatted text






Monday, August 31, 2015

Export to Excel (customize the look and feel of the text in Excel) ADF

Create a button -> Add File Download Listener to it (mention the name of file; content type of file; define the method  in backing bean)

// method


// sample page example

// paint the file however you like by iterating through the rows
http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html#sthash.ex7znOTY.dpbs

Sample code:
https://drive.google.com/file/d/1m1bvkrEF4qOr9ZCn1UVMaK1HLyWqorwR/view?usp=sharing

Friday, July 31, 2015

Non-breaking space for Output text ADF

<h:outputText value="&#160;" />
or
<af:outputText inilineStyle="white-space:pre;" .../>

Tuesday, May 19, 2015

Read a parameter from URL ADF

HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
System.err.println("GET :" + request.getParameter("name"));
In the taskflow add a method to get the parameter from URL
init method and jsff in the taskflow; add the taskflow to the jspx page
init method is the initiator for the taskflow which gets the parameter from the URL 
Example to pass parameter to  URL: http://vijaysadhu.blogspot.com/search?q=url
http://host:7001/App/faces/home.jspx?name=vijay
set the value to a scope variable to use it in the app;
Another Approach:
        String currencyCode =
            FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("currencyCode") ==
            null ? "0" :
            FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("currencyCode");
        
String reportType =
            FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("reportType") == null ?
            "0" : FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("reportType");
       
        System.out.println("currencyCode - " + currencyCode + " - company - " + company + " - reportType - " +
                           reportType );
Example: http://127.0.0.1/App/faces/demo.jspx?currencyCode=USD&reportType=Q3







Monday, May 4, 2015

Align the column header and components in the column to "center" in af:table ADF

Column Header:

Add the tag align="center" 

Component in Column Header:

Add the tag inlineStyle="text-align:center;"

Example:

<table>
<af:column id="c23" align="center" headerText="Column Header" width="7%" inlineStyle="text-align:center;">
</table>