Tag name: <amc:outputText>
The outputText component supports styled text. The text can optionally be left unescaped, and supports conversion to and from Java objects.

WM outputText screenshot
An outputText component running on Windows Mobile.

BB outputText screenshot
An outputText component running on BlackBerry.

<amc:outputText value="AFFieldText"/>

Attributes

Name Type Supports EL? Description
align String Yes Specifies the horizontal alignment of an element with respect to the surrounding context. Valid values:
  • left (default): the component is rendered flush left.
  • center: the component is centered horizontally.
  • right: the component is rendered flush right.
The attribute is ignored and defaulted to left when the parent Panel Group Layout has a horizontal layout.

Note: On BlackBerry smartphones, if the attribute value is assigned by an EL expression, any changes to the value will not affect the visual appearance of the element once it is rendered.
backgroundColor String Yes Sets the color of a background to an RGB value (rgb(255,0,0)) or a hexadecimal number (#ff0000 or #f00). The default value is device-dependent.
disabled boolean Yes Specifies whether or not the component is disabled. Unlike a read-only component, a disabled component cannot receive focus.
focusable boolean Yes Specifies whether or not this component can acquire focus set to it by the user. Unlike disabled, clicking on a focusable component will cause the component to receive focus.
fontFamily String Yes Defines a prioritized list of font family names and/or generic family names for an element. The client will use the first value it recognizes. Valid values:
  • family-name: the name of a font-family, such as "times", "courier", "arial", and so on.
  • generic-family: the name of a generic-family, such as "serif", "sans-serif", "cursive", "fantasy", "monospace".
Note: Each value has to be separated with a comma, and a generic-family name should always be offered as the last alternative. Also, supported font type is limited by the mobile device operating system. Please verify if the specified fontFamily is supported on device or simulator.
fontSize int Yes Specifies the size of a font in points.
fontStyle String Yes Specifies how the characters in text should be displayed. Valid values:
  • normal: defines normal characters.
  • bold: defines thick characters.
  • italic: defines slanted characters.
  • underline: defines underlined characters.
Two or more styles can be combined by providing a space between them. For example, the following creates text that is bold and underlined:
fontStyle="bold underline".
foregroundColor String Yes Specifies the color of the foreground of an element. The color value can be an RGB value (rgb(255,0,0)) or a hexadecimal number (#ff0000 or #f00). The default value is device-dependent.
height int Yes Specifies the height of the component. Can be entered in pixels or as a percentage of its parent's height. A percentage value should be entered as a number followed by the "%" symbol. A number will be interpreted as a pixel value (as will a number followed by the text "px").
id String No Specifies the identifier for the component. The identifier must follow the following rules:
  • Must not be a zero-length String.
  • First character must be an ASCII letter (A-Za-z) or an underscore ('_').
  • Subsequent characters must be an ASCII letter or digit (A-Za-z0-9), an underscore ('_'), or a dash ('-').
justification String Yes Specifies the horizontal alignment of the component's text. Valid values:
  • left: the text is rendered flush left.
  • center: the text is centered horizontally.
  • right: the text is rendered flush right.
Note: If the attribute value is assigned by an EL expression, any changes to the value will not affect the visual appearance of the element once it is rendered.
rendered boolean Yes Specifies whether or not the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible).
truncateAt int Yes Specifies the length at which the text should automatically begin truncating. When set to zero (the default), the string will never truncate. Values from one to fifteen will display the first 12 characters followed by an ellipsis (...). The component will not truncate strings shorter than fifteen characters. For example, for the value of 1234567890123456, setting truncateAt to 0 or 16 will not truncate. Setting truncateAt to any value between 1 and 15 will truncate to 123456789012...
value Object Yes Specifies the value of the component.
verticalAlign String Yes Specifies the vertical alignment of a component with respect to the surrounding context. Valid values:
  • top: the component is rendered flush top.
  • middle: the component is centered vertically.
  • bottom: the component is rendered flush bottom.
This attribute is ignored and defaulted to top when the parent Panel Group Layout has a vertical layout.

Note: On BlackBerry smartphones, if the attribute value is assigned by an EL expression, any changes to the value will not affect the visual appearance of the element once it is rendered.
verticalJustification String Yes Specifies the vertical alignment of a component's text. Valid values:
  • top: the text is rendered flush top.
  • middle: the text is centered vertically.
  • bottom: the text is rendered flush bottom.
Note: If the attribute value is assigned by an EL expression, any changes to the value will not affect the visual appearance of the element once it is rendered.
width int Yes Specifies the width of this component. Can be entered in pixels or as a percentage of its parent's width. A percentage value should be entered as a number followed by the "%" symbol. A number will be interpreted as a pixel value (as will a number followed by the text "px").