silverorange Code


Swat.SwatEntry
/Swat/SwatEntry.php at line 16

Class SwatEntry

SwatObject
└─SwatUIObject
└─SwatWidget
└─SwatControl
└─SwatInputControl
└─SwatEntry

public class SwatEntry
extends SwatInputControl

A single line text entry widget

Copyright:
2004-2006 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Field Summary
string

$access_key

Access key.

boolean

$autocomplete

Whether or not to use browser-based autocompletion on this entry.

integer

$maxlength

Maximum length.

integer

$minlength

Minimum length.

protected string

$nonce

If autocomplete is turned off, this nonce is used to obfuscate the name of the XHTML input tag.

boolean

$read_only

Read only?.

integer

$size

Input size.

integer

$tab_index

Tab index.

string

$value

Entry value.

Fields inherited from Swat.SwatInputControl
required
Method Summary
void

display()

Displays this entry widget.

protected array

getCSSClassNames()

Gets the array of CSS classes that are applied to this entry widget.

protected string

getDisplayValue(string value)

Formats a value to display.

string

getFocusableHtmlId()

Gets the id attribute of the XHTML element displayed by this widget that should receive focus.

protected SwatHtmlTag

getInputTag()

Get the input tag to display.

protected void

getNonce()

protected string

getRawValue()

Gets the raw value entered by the user before processing.

string

getState()

Gets the current state of this entry widget.

protected SwatMessage

getValidationMessage(string id)

Gets a validation message for this entry.

protected boolean

hasRawValue()

Gets whether or not a value was submitted by the user for this entry.

void

process()

Processes this entry widget.

void

setState(string state)

Sets the current state of this entry widget.

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

Field Detail

/Swat/SwatEntry.php at line 54

access_key

public string $access_key = null

Access key

Access key for this form input, for keyboard nagivation.


/Swat/SwatEntry.php at line 82

autocomplete

public boolean $autocomplete = true

Whether or not to use browser-based autocompletion on this entry

Note: Be careful writing JavaScript when using this property as it changes the id of the XHTML element.


/Swat/SwatEntry.php at line 45

maxlength

public integer $maxlength = null

Maximum length

Maximum number of allowable characters in HTML text form input, or null.


/Swat/SwatEntry.php at line 63

minlength

public integer $minlength = null

Minimum length

Minimum number of allowable characters in HTML text form input, or null.


/Swat/SwatEntry.php at line 102

nonce

protected string $nonce = null

If autocomplete is turned off, this nonce is used to obfuscate the name of the XHTML input tag.


/Swat/SwatEntry.php at line 91

read_only

public boolean $read_only = false

Read only?

If read-only, the input will not allow editing its contents


/Swat/SwatEntry.php at line 36

size

public integer $size = 50

Input size

Size in characters of the HTML text form input, or null.


/Swat/SwatEntry.php at line 72

tab_index

public integer $tab_index = null

Tab index

The ordinal tab index position of the XHTML input tag, or null.


/Swat/SwatEntry.php at line 27

value

public string $value = null

Entry value

Text content of the widget, or null.


Method Detail

/Swat/SwatEntry.php at line 112

display

public void display()

Displays this entry widget

Outputs an appropriate XHTML tag.


/Swat/SwatEntry.php at line 326

getCSSClassNames

protected array getCSSClassNames()

Gets the array of CSS classes that are applied to this entry widget

Returns:
the array of CSS classes that are applied to this entry widget.
See Also:
SwatUIObject::getCSSClassString()

/Swat/SwatEntry.php at line 312

getDisplayValue

protected string getDisplayValue(string value)

Formats a value to display

Can be used by subclasses to change what is displayed.

Parameters:
value - the value to format for display.
Returns:
the formatted value.

/Swat/SwatEntry.php at line 219

getFocusableHtmlId

public string getFocusableHtmlId()

Gets the id attribute of the XHTML element displayed by this widget that should receive focus

Returns:
the id attribute of the XHTML element displayed by this widget that should receive focus or null if there is no such element.
See Also:
SwatWidget::getFocusableHtmlId()

/Swat/SwatEntry.php at line 270

getInputTag

protected SwatHtmlTag getInputTag()

Get the input tag to display

Can be used by sub-classes to change the setup of the input tag.

Returns:
Input tag to display.

/Swat/SwatEntry.php at line 336

getNonce

protected void getNonce()

/Swat/SwatEntry.php at line 355

getRawValue

protected string getRawValue()

Gets the raw value entered by the user before processing

Returns:
the rav value entred by the user before processing or null if no value was entered by the user.
See Also:
SwatEntry::hasRawValue()

/Swat/SwatEntry.php at line 186

getState

public string getState()

Gets the current state of this entry widget

Returns:
the current state of this entry widget.
See Also:
SwatState::getState()

/Swat/SwatEntry.php at line 239

getValidationMessage

protected SwatMessage getValidationMessage(string id)

Gets a validation message for this entry

Can be used by sub-classes to change the validation messages.

Parameters:
id - the string identifier of the validation message.
Returns:
the validation message.

/Swat/SwatEntry.php at line 392

hasRawValue

protected boolean hasRawValue()

Gets whether or not a value was submitted by the user for this entry

Note: Users can submit a value of nothing and this method will return true. This method only returns false if no data was submitted at all.

Returns:
true if a value was submitted by the user for this entry and false if no value was submitted by the user.
See Also:
SwatEntry::getRawValue()

/Swat/SwatEntry.php at line 140

process

public void process()

Processes this entry widget

If any validation type errors occur, an error message is attached to this entry widget.


/Swat/SwatEntry.php at line 201

setState

public void setState(string state)

Sets the current state of this entry widget

Parameters:
state - the new state of this entry widget.
See Also:
SwatState::setState()

silverorange Code