org.sgx.j2s.aui
Class AutoComplete

Package class diagram package AutoComplete
java.lang.Object
  extended by org.sgx.j2s.js.NativeWrapper
      extended by org.sgx.j2s.yui3.yui.YUINativeWrapper
          extended by org.sgx.j2s.yui3.yui.event.EventTarget
              extended by org.sgx.j2s.yui3.yui.Attribute
                  extended by org.sgx.j2s.yui3.yui.Base
                      extended by org.sgx.j2s.yui3.yui.widget.Widget
                          extended by org.sgx.j2s.aui.Component
                              extended by org.sgx.j2s.aui.AutoComplete

public class AutoComplete
extends Component

A base class for AutoComplete, providing:
Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)
Presenting users choices based on their input
Separating selected items
Keyboard interaction for selecting items
Quick Example:

var instance = new A.AutoComplete({
dataSource: [['AL', 'Alabama', 'The Heart of Dixie'],
['AK', 'Alaska', 'The Land of the Midnight Sun'],
['AZ', 'Arizona', 'The Grand Canyon State']],
schema: {
resultFields: ['key', 'name', 'description']
},
matchKey: 'name',
delimChar: ',',
typeAhead: true,
contentBox: '#myAutoComplete'
}).render();


Field Summary
 
Fields inherited from class org.sgx.j2s.yui3.yui.YUINativeWrapper
Y
 
Fields inherited from class org.sgx.j2s.js.NativeWrapper
_data, _EMPTYPARAMS
 
Constructor Summary
AutoComplete()
           
 
Method Summary
(package private)  boolean doBeforeExpandContainer(java.lang.String query, java.lang.Object allResults)
          An overridable method that is executed before the result container is shown.
 
Methods inherited from class org.sgx.j2s.aui.Component
clone, toggle
 
Methods inherited from class org.sgx.j2s.yui3.yui.widget.Widget
blur, disable, enable, focus, getByNode, getClassName, getDefaultLocale, getSkinName, getString, getStrings, hide, render, show
 
Methods inherited from class org.sgx.j2s.yui3.yui.Attribute
addAttr, addAttrs, attrAdded, get, getAttrs, modifyAttr, removeAttr, reset, set, setAttrs
 
Methods inherited from class org.sgx.j2s.yui3.yui.event.EventTarget
after, before, detach, detachAll, fire, getEvent, on, once, publish
 
Methods inherited from class org.sgx.j2s.yui3.yui.YUINativeWrapper
_load
 
Methods inherited from class org.sgx.j2s.js.NativeWrapper
_call, _get, _getData, create
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoComplete

public AutoComplete()
Method Detail

doBeforeExpandContainer

boolean doBeforeExpandContainer(java.lang.String query,
                                java.lang.Object allResults)
An overridable method that is executed before the result container is shown. The method can return false to prevent the container from being shown.

Parameters:
query - The query that was submitted to the data source
allResults - The parsed results