Buttons Generated As Standard Html Buttons In ADF Faces On Linux
By Didier Laurent on Jun 09, 2008
ProblemThis question comes regularly in the OTN forums.
You have developed your application on a Windows system and defined your own skin (css), including some customizations for the buttons f.ex.:
font-family: Arial, Helvetica;
When you run the application in the Embedded OC4J on Windows, the page renders correctly, with the buttons generated as "image buttons":
However, the same application deployed on iAS on your Linux machine shows the buttons as standard HTML buttons:
You use the following Java Option in iAS on Linux:
as recommended in the JDeveloper online help, "About ADF Faces Supported Platforms".
So, what's the problem ?
CauseThe font "Arial" is not available on your Operating System.
The ADF Faces buttons are normally generated as GIF files by the Java's AWT graphics library.
When the Java API doesn't have access to the specified font, it generates the button as a standard HTML button.
SolutionEither install the missing font on your Linux system (the Java API will use it to generate the image buttons) or use another font.
The best choice to avoid the problem when deploying the application on different platform is to specify a logical font (Dialog, SansSerif, ...), that's mapped to an existing physical font on your OS.
You can find the list of the mapping in <iAS_Home>\jdk\jre\lib\font.properties
NB: this name may differ depending on the OS
F.ex. the "SansSerif" logical font is mapped to the "Lucida Sans" physical font:
and the Lucida font is always installed as part of the JDK (in ...\jre\lib\fonts).
So you are sure with this solution that the buttons will always be generated as image buttons, whatever the OS you are deploying to.
NB: though it was written for UIX, most of the information contained in the chapter "18. Image Generation in ADF UIX" of the "Oracle ADF UIX Developer's Guide" is still valid for ADF Faces.