|
Project Wonder 5.0.0.8660 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.webobjects.appserver.WOElement
com.webobjects.appserver.WOComponent
er.ajax.AjaxComponent
er.ajax.AjaxAutoComplete
public class AjaxAutoComplete
Autocompleting combo-box similar to Google suggest.
This is a component that look like a text field, where when you start
entering value, it start giving you a menu of options related to what you
type. Think about the auto-completion feature of many IDE (XCode / Eclipse)
inside a textField.
The scriptaculous library has 2 version of the autocompleter combo-box :
a local version and an ajax version.
isLocal binding. Then the list binding will
need to provide all the objects needed to be found. Filtering of the list as
you type will be done client-side, all javascript.
| Bindings | |
list | bound to a method that should return the whole list of object
to be displayed. When used in an Ajax context, the component will
push first to the value binding, giving you the chance
to narrow the list of elements displayed. When used in a Local
context, the list should contain all possible objects. the list will
be filtered by the scriptaculous engine. |
value | string that will hold the text entered in the field. It is
continiously updated. |
item | pushed and pulled the current element of the list. This can be
used to customized the string representation (in conjuction with the
displayString binding) of the object. |
displayString | optional custom string representation of the current
element. |
isLocal | boolean indicating if you want the list to be completely
client-side. Binding a true value, would mean that the list will
filtered on the client. |
isLocalSharedList | boolean indicating if the list needs to be shared. |
localSharedVarName | the name of the javascript variable to use to
store the list in. The list is stored in the userInfo dictionary
on the server side to allow for shared use by multiple auto complete
components. |
token | token |
frequency | Look at the scriptaculous documentation. |
minChars | Look at the scriptaculous documentation. |
indicator | Look at the scriptaculous documentation. |
updateElement | Look at the scriptaculous documentation. |
afterUpdateElement | Look at the scriptaculous documentation. |
fullSearch | Look at the scriptaculous documentation. |
partialSearch | Look at the scriptaculous documentation. |
choices | Look at the scriptaculous documentation (Local only) |
partialChars | Look at the scriptaculous documentation (Local only) |
ignoreCase | Look at the scriptaculous documentation (Local only) |
accesskey | hot key that should activate the text field (optional) |
tabindex | tab index of the text field (optional) |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.webobjects.appserver.WOComponent |
|---|
WOComponent._EventLoggingEnabler, WOComponent.Event |
| Nested classes/interfaces inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
|---|
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility |
| Nested classes/interfaces inherited from interface com.webobjects.foundation.NSValidation |
|---|
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException |
| Field Summary | |
|---|---|
String |
divName
|
String |
fieldName
|
| Fields inherited from class er.ajax.AjaxComponent |
|---|
log |
| Fields inherited from class com.webobjects.appserver.WOComponent |
|---|
_Extension, _IsEventLoggingEnabled, _keyAssociations |
| Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling |
|---|
_CLASS |
| Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions |
|---|
_CLASS, _KeyPathSeparatorChar, KeyPathSeparator |
| Fields inherited from interface com.webobjects.foundation.NSValidation |
|---|
_CLASS |
| Constructor Summary | |
|---|---|
AjaxAutoComplete(WOContext context)
|
|
| Method Summary | |
|---|---|
protected void |
addRequiredWebResources(WOResponse res)
Adds all required resources. |
void |
appendToResponse(WOResponse res,
WOContext ctx)
Overridden to add the initialization javascript for the auto completer. |
void |
awake()
Overridden to set the IDs for the field and the div tag. |
protected NSDictionary |
createAjaxOptions()
|
WOActionResults |
handleRequest(WORequest request,
WOContext context)
Handles the Ajax request. |
boolean |
isStateless()
Overridden because the component is stateless |
boolean |
synchronizesVariablesWithBindings()
Overridden because the component does not synch with the bindings. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public String divName
public String fieldName
| Constructor Detail |
|---|
public AjaxAutoComplete(WOContext context)
| Method Detail |
|---|
public void awake()
awake in class WOComponentpublic boolean isStateless()
isStateless in class WOComponentpublic boolean synchronizesVariablesWithBindings()
synchronizesVariablesWithBindings in class WOComponentprotected NSDictionary createAjaxOptions()
public void appendToResponse(WOResponse res,
WOContext ctx)
appendToResponse in class AjaxComponentprotected void addRequiredWebResources(WOResponse res)
addRequiredWebResources in class AjaxComponent
public WOActionResults handleRequest(WORequest request,
WOContext context)
handleRequest in interface IAjaxElementhandleRequest in class AjaxComponent
|
Last updated: Sat, Nov 22, 2008 04:24 AM EST | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||