|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Object
|
+--Field
|
+--ComponentField
|
+--AutoCompleteField
Defined in form/autocompletefield.js
| Field Summary | |
Object |
autoComplete
Holds the div element used to show autocomplete choices |
Number |
choiceCount
Last count of choices |
Array |
choiceItems
Last list of available choices |
Boolean |
choosing
Indicates a choice is being made |
Boolean |
fldChanged
Indicates text field changed |
Object |
options
Component settings |
Boolean |
overChoices
Flag that indicates mouse is over the choices container |
Boolean |
selectedIndex
Index of the current selected choice |
| Fields inherited from class ComponentField |
componentClass
|
| Fields inherited from class Field |
fld, id, name, label, type
|
| Constructor Summary | |
AutoCompleteField
(<String> id, <Object> options)
AutoCompleteField adds autocomplete funcionality to a normal text input. |
|
| Method Summary | |
void
|
blurHandler(<Event> e)
Gets called when text input looses focus. |
void
|
choiceClickHandler(<Event> e)
Handles click on choice items |
void
|
choiceHoverHandler(<Event> e)
Handles mouseover/mouseout events on choice items |
<private> void
|
chooseByIndex(<Number> idx)
Choose an available choice from its index |
void
|
clear()
Clear the component's value |
void
|
disable()
Disable the component |
Number
|
findLastSeparator()
Finds the last separator position in the field contents |
void
|
getChoices()
Retrieve the choices for the current search token. |
String
|
getLastToken()
Retrieve the search token. |
Object
|
getValue()
Retrieve the component's value. |
void
|
hideChoices()
Hide the auto complete choices box |
Boolean
|
isEmpty()
Check if the component's value is empty |
void
|
keyDownHandler(<Event> e)
Handles keydown event. |
void
|
keyUpHandler(<Event> e)
Handles keyup event. |
void
|
mouseHandler(<Event> e)
Mouse events handler for the choices container. |
<private> void
|
navigate(<Number> fw)
Navigate by a given offset in the available choices |
void
|
setup()
Initializes all options and event handlers |
void
|
setValue(<Object> val)
Define a new value for the component. |
void
|
showChoices()
Display a box containing the available choices |
void
|
timerHandler()
Gets called when the delay after the last typed key is reached. |
<private> void
|
updateChoices(<String> html)
Update the choices box contents |
| Methods inherited from class ComponentField |
raiseEvent
|
| Methods inherited from class Field |
getFormElement, getMask, enable, setDisabled, focus, beforeFocus, serialize
|
| Field Detail |
Object autoComplete
Number choiceCount
Array choiceItems
Boolean choosing
Boolean fldChanged
Object options
Boolean overChoices
Boolean selectedIndex
| Constructor Detail |
AutoCompleteField(<String> id, <Object> options)
id - Field ID
options - Settings
| Method Detail |
void blurHandler(<Event> e)
e - Event
void choiceClickHandler(<Event> e)
e - Event
void choiceHoverHandler(<Event> e)
e - Event
<private> void chooseByIndex(<Number> idx)
idx - Choice index
void clear()
void disable()
Number findLastSeparator()
void getChoices()
String getLastToken()
Object getValue()
void hideChoices()
Boolean isEmpty()
void keyDownHandler(<Event> e)
e - Event
void keyUpHandler(<Event> e)
e - Event
void mouseHandler(<Event> e)
e - Event
<private> void navigate(<Number> fw)
fw - Offset
void setup()
void setValue(<Object> val)
val - New value
void showChoices()
void timerHandler()
<private> void updateChoices(<String> html)
html - New contents
|
PHP2Go Javascript Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||