au.id.jericho.lib.html

Class FormControlOutputStyle


public final class FormControlOutputStyle
extends java.lang.Object

An enumerated type representing the three major output styles of a form control's output element.

A form control's output style is set using the FormControl.setOutputStyle(FormControlOutputStyle) method.

Nested Class Summary

static class
FormControlOutputStyle.ConfigDisplayValue
Contains static properties that configure the FormControlOutputStyle.ConfigDisplayValue form control output style.

Field Summary

static FormControlOutputStyle
DISPLAY_VALUE
The normal output element is replaced with a simple representation of the form control's submission value(s).
static FormControlOutputStyle
NORMAL
Normal display of the output element.
static FormControlOutputStyle
REMOVE
Remove the output element from the output document completely.

Method Summary

String
getDebugInfo()
Returns a string representation of this object useful for debugging purposes.
String
toString()
Returns a string representation of this object useful for debugging purposes.

Field Details

DISPLAY_VALUE

public static final FormControlOutputStyle DISPLAY_VALUE
The normal output element is replaced with a simple representation of the form control's submission value(s).

The implementation of this functionality is highly subjective, but provides a more aesthetic way of displaying a read-only version of a form without having to resort to using disabled controls.

The representation is dependent on the form control type, and can be configured using the static properties of the ConfigDisplayValue nested class.

Unless specified otherwise below, the normal output element is replaced with a display value element having the name specified in the static ConfigDisplayValue.ElementName property (div by default). The attributes specified in the static ConfigDisplayValue.AttributeNames list (id, class and style by default) are copied from the normal output element into the display value element.

Details of the content of the display value element or other representation of the control value are as follows:

TEXTFILE
display value elementre-encodednormaloutput element'svalue
TEXTAREA
display value elementTEXTAREAwith white space formatting
CHECKBOXRADIO
normaloutput elementConfigDisplayValue.CheckedHTMLConfigDisplayValue.UncheckedHTMLnormaloutput elementcheckednulloutput elementdisabled
SELECT_SINGLESELECT_MULTIPLE
display value elementre-encodedSELECT_MULTIPLEConfigDisplayValue.MultipleValueSeparator,
PASSWORD
display value elementencodedConfigDisplayValue.PasswordChar*nnsubmission value
HIDDEN
output elementremoved
BUTTONSUBMITIMAGE
output elementdisabled

If the submission value of the control is null or an empty string, the display value element is given the un-encoded content specified in the ConfigDisplayValue.EmptyHTML static property.


NORMAL

public static final FormControlOutputStyle NORMAL
Normal display of the output element.

This is the default display style.


REMOVE

public static final FormControlOutputStyle REMOVE
Remove the output element from the output document completely.

Method Details

getDebugInfo

public String getDebugInfo()
Returns a string representation of this object useful for debugging purposes.
Returns:
a string representation of this object useful for debugging purposes.

toString

public String toString()
Returns:
a string representation of this object useful for debugging purposes.