Flipkart Search

Showing posts with label adf output text. Show all posts
Showing posts with label adf output text. Show all posts

Monday, 3 February 2014

HTML Formatting / Styling in ADF outputText

HTML Formatting in outputText (Escape Attribute)


For applying styling to some of the content, outputText's escape attribute could be used. Example:-

<af:outputText value="&lt;h2>ADF Tips and Tricks&lt;/h2>"/>
<af:outputText value="&lt;h2>ADF Tips and Tricks&lt;/h2>"
               escape="false"/>

Output
<h2>ADF Tips and Tricks</h2>
ADF Tips and Tricks

Note: You should avoid setting the escape attribute to false unless absolutely necessary. outputFormatted  component is more recommended in such cases.


Friday, 6 September 2013

truncate output text or see more implementation - ADF output text tutorial-11

Some time we have requirement to show only a fix length of text in UI and show remaining text on demand.Oracle ADF provides this functionality out of box.
In the property of OutputText we can find truncate at
 truncateAt=10

It truncates the text at 10, or it can be decided by an EL or java method return


In the above example text is  truncated on 10th letter and then ... is appended to show there is more text.Hovering the mouse above text will show the whole content.