About FormattedText

Use the formattedText component to output formatted text containing a limited set of HTML markup. The formattedText component supports the following HTML markup only:

and the following entities:

ADF UIX might modify the input HTML for output. For example, paragraph and list item elements are closed if they are left open in the input text. Other HTML markup may be replaced with output that is more appropriate to the current look-and-feel or user agent.

Tip: Use the rawText component if you require more HTML markup functionality. For HTML tables or HTML links, you can use the rawText component or you can use the tableLayout or link component, respectively.

The formattedText component supports both the styleClass and styleUsage attributes. If both attributes are set, the styleClass attribute takes precedence over the styleUsage attribute.

The UIX XML code snippet below produces this:

Examples of formatted text


Example:

...
<stackLayout>
  <separator>
    <separator/>
  </separator>
  <contents>
    <formattedText text="This is the formattedText using instruction styleUsage." 
                   styleUsage="instruction" />
    <formattedText text="This is some text.&lt;br&gt; A new line of &lt;p&gt;&lt;big&gt;&lt;i&gt;text&lt;/i&gt;&lt;/big&gt; 
                        that is &lt;b&gt;bold&lt;/b&gt; and &lt;span class=&quot;OraHeader&quot;&gt; styled &lt;/span&gt;"/>
    <formattedText text="Below is text that can be used in a pageStamp area. 
                         It uses styleUsage=pageStamp:" 
                   styleUsage="instruction" />
    <formattedText text="Logged in as &lt;b&gt;Scott&lt;/b&gt;" 
                   styleUsage="pageStamp" /> 
    <formattedText text="some text">
      <inlineStyle>
        <property name="color">red</property>
      </inlineStyle>
    </formattedText> 
  </contents>
</stackLayout>
...    

Inserting FormattedText
Working with Simple and Miscellaneous Components

 

Copyright © 1997, 2004, Oracle. All rights reserved.