SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatEntry
└─SwatNumericEntry
└─SwatFloatEntry
└─SwatMoneyEntry
public class SwatMoneyEntry
extends SwatFloatEntry
| Field Summary | |
|---|---|
| integer | Number of decimal places to accept. |
| boolean | Whether to display international currency symbol. |
| string | Optional locale for currency format. |
| Method Summary | |
|---|---|
| void | display() Displays this money entry widget. |
| protected array | Gets the array of CSS classes that are applied to this entry. |
| protected string | getDisplayValue(string value) Formats a monetary value to display. |
| protected mixed | getNumericValue(string value) Gets the numeric value of this money entry. |
| protected SwatMessage | getValidationMessage(string id) Gets a validation message for this money entry widget. |
| void | process() Processes this money entry widget. |
| Methods inherited from Swat.SwatFloatEntry | |
|---|---|
| getCSSClassNames, getDisplayValue, getNumericValue, getValidationMessage, process | |
| Methods inherited from Swat.SwatNumericEntry | |
|---|---|
| getCSSClassNames, getNumericValue, getValidationMessage, process | |
| Methods inherited from Swat.SwatEntry | |
|---|---|
| display, getCSSClassNames, getDisplayValue, getFocusableHtmlId, getInputTag, getNonce, getRawValue, getState, getValidationMessage, hasRawValue, process, setState | |
| Methods inherited from Swat.SwatInputControl | |
|---|---|
| getForm, init | |
| Methods inherited from Swat.SwatControl | |
|---|---|
| addMessage, getNote, printWidgetTree | |
| Methods inherited from Swat.SwatWidget | |
|---|---|
| addCompositeWidget, addMessage, confirmCompositeWidgets, copy, createCompositeWidgets, display, displayHtmlHeadEntries, getCSSClassNames, getCompositeWidget, getCompositeWidgets, getFocusableHtmlId, getHtmlHeadEntrySet, getMessages, hasMessage, init, isDisplayed, isInitialized, isProcessed, isSensitive, printWidgetTree, process, replaceWithContainer | |
| Methods inherited from Swat.SwatUIObject | |
|---|---|
| addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible | |
public integer $decimal_places = null
Number of decimal places to accept
This also controls how many decimal places are displayed when editing existing values.
If set to null, the number of decimal places allowed by the locale is used.
public boolean $display_currency = false
Whether to display international currency symbol
If true, displays the international currency symbol after the input box.
public string $locale = null
Optional locale for currency format
If no locale is specified, the current system locale is used.
public void display()
Displays this money entry widget
The widget is displayed as an input box and an optional currency symbol.
protected array getCSSClassNames()
Gets the array of CSS classes that are applied to this entry
protected string getDisplayValue(string value)
Formats a monetary value to display
value - the value to format for display.protected mixed getNumericValue(string value)
Gets the numeric value of this money entry
value - the raw value to use to get the numeric value.protected SwatMessage getValidationMessage(string id)
Gets a validation message for this money entry widget
id - the string identifier of the validation message.public void process()
Processes this money entry widget
If the value of this widget is not a monetary value or the number of fractional decimal places is not within the allowed range, an error message is attached to this money entry widget.
A money entry widget