JSF Assist

JSF Assist objects manage keyboard and mouse interactions for input field of a specific type, that is, they support "input assist" interactions for a field. As with converters and validators, these objects are typed, that is, there is one for dates, one for masks and one for numbers.

These objects are not available for public use (you cannot construct one and use it), instead these objects are created by the input assist behaviors.

Assist objects use three other JSF objects -- an appropriately typed Converter object (e.g., a DateTime Converter), an appropriately typed Validator object (if the field is to be validated), and an Input state object (created by Behaviors to provide generic keyboard and mouse events).

Each assist object supports a uniform set of calls that handle keyboard/mouse interactions. For example, there's an onfocus handler, an onblur handler, a keypress handler, a cut handler, a paste handler, etc. As events are generated for a field, they are sent to the Input State object for the field which handles general keyboard/mouse state management. The Input State object then calls the appropriate assist object which provides type-specific support for each event. For example, when a user presses left-arrow, the event caught by the Input State object which determines a control key was pressed, the state of the field is set to "processing", and it calls the onChangeKeyCode handler of the appropriate assist object. The key code handler, then determines how a left arrow key is processed for a value of this type. The key is processed and the field's state updated. Control returns to the Input State manager which determines the next step in state processing (e.g., it may then check if the field is full and autotab should be invoked).

The documentation of the three assist objects, describes generally how assist works for each of the supported types.

Constructor Syntax

new hX_5.NameAssist(_elem, _state, _converter, _validator, _promptChar)); where

id

The ID to be assigned to this converter. The id must be unique across all created converters within the page (or portal). Any string value may be used as the ID.

Name

The name of the JSF assist. See below for the list of assist objects.

_elem

DOM object of the input field.

_state

Input State object associated with a JSF Behavior.

_converter

Converter object that defines the pattern/format of the field.

_validator

Optional validator object associated with the Behavior.

_promptChar

Prompt character to use in input assist for this field (single character).

API calls

There are no common API calls on an assist. Assist objects are private to the implementation of behaviors.

List of assist objects

Converter

Description

NumberAssist

Manages the keystroke/mouse events for an input field of type number

DateTimeAssist

Manages the keystroke/mouse events for an input field of type date/time

MaskAssist

Manages the keystroke/mouse events for an input field of type assist

Related concepts
JSF Widget Library (JWL)

Feedback