Echo.Sync
TextComponent
Abstract
Class Hierarchy:
Direct Known Subclasses:
Echo.Sync.TextArea, Echo.Sync.TextField

Component rendering peer: TextComponent Note that this component has workarounds for issues with percentage-width text fields/areas in various browsers. Percentage widths are reduced based on container size and border width to ensure overall width of component meets user-set percent width specification. Workaround is also provided for Internet Explorer 6's growing textarea bug.

Class Field Summary
Internal _supportedPartialProperties
Array containing properties that may be updated without full re-render.

Instance Method Summary
Public, Virtual sanitizeInput()
Invoked to ensure that input meets requirements of text field.
Internal _renderStyle()
Renders style information: colors, borders, font, insets, etc.
Internal _addEventHandlers()
Registers event handlers on the text component.
Internal _adjustPercentWidth()
Reduces a percentage width by a number of pixels based on the container size.
Internal _processBlur()
Processes a focus blur event.
Internal _processClick()
Processes a mouse click event.
Internal _processFocus()
Processes a focus event.
Internal _processKeyPress()
Processes a key press event.
Internal _processKeyUp()
Processes a key up event.
Internal _processRestrictionsClear()
Event listener to process input after client input restrictions have been cleared.
Public renderAddToParent()
Adds the input element to its parent in the DOM.
Public renderDisplay()
Public renderDispose()
Public renderFocus()
Public renderUpdate()
Internal _storeValue()
Stores the current value of the input field, if the client will allow it.

Methods inherited from class Echo.Render.ComponentSync
renderAdd, renderDispose, renderUpdate

Instance Method Detail
sanitizeInput
Invoked to ensure that input meets requirements of text field. Default implementation ensures input does not exceed maximum length.

_renderStyle
Renders style information: colors, borders, font, insets, etc. Sets percentWidth flag.

_addEventHandlers
Registers event handlers on the text component.

_adjustPercentWidth
Reduces a percentage width by a number of pixels based on the container size.
Parameters:
percentValue (Number) - the percent span
reducePixels (Number) - the number of pixels by which the percent span should be reduced
containerPixels (Number) - the size of the container element

_processBlur
Processes a focus blur event.

_processClick
Processes a mouse click event. Notifies application of focus.

_processFocus
Processes a focus event. Notifies application of focus.

_processKeyPress
Processes a key press event. Prevents input when client is not ready.

_processKeyUp
Processes a key up event.

_processRestrictionsClear
Event listener to process input after client input restrictions have been cleared.

renderAddToParent
Adds the input element to its parent in the DOM. Wraps the element in a special container DIV if necessary to appease Internet Explorer's various text field/area bugs, including percent-based text areas inducing scroll bars and the IE6 percentage width "growing" text area bug.
Parameters:
parentElement - the parent element

renderDisplay

renderDispose

renderFocus

renderUpdate

_storeValue
Stores the current value of the input field, if the client will allow it. If the client will not allow it, but the component itself is active, registers a restriction listener to be notified when the client is clear of input restrictions to store the value later.
Parameters:
keyEvent - the user keyboard event which triggered the value storage request (optional)