Tuesday, December 28, 2010

Displaying special characters on UI

You can use Unicode to display special charters on UI components. You may need to use the resource bundle to hold the Unicode values (of the special characters), and the same can be referred from the UI using the key.


ResourceBundle Entry
-----------------------
view.copyRightSymbol=\u00a9

JSF
----
<c:set var="viewcontrollerBundle"
 value="#{adfBundle['view.ViewControllerBundle']}"/>
<af:outputText 
value="Copyright #{viewcontrollerBundle['view.copyRightSymbol']}" id="ot1"/>


The output on the page may look like as shown in the following image.

No comments: