T
- public interface IAutoCompleteRenderer<T> extends IDetachable
AutoCompleteBehavior
.
Helper implementations of this interface may abstract the implementation specific details. Direct implementations of this interface should only be used when total control is required.
The autocompletion value is supplied via an attribute on the first html element named
textvalue
, if no attribute is found the innerHtml property of the first element will
be used instead.
For example:
new IAutoCompleteRenderer() { void renderHead(Response r) { r.write("
Modifier and Type | Method and Description |
---|---|
default void |
detach()
Override when needed.
|
void |
render(T object,
Response response,
String criteria)
Render the html fragment for the given completion object.
|
void |
renderFooter(Response response,
int count)
Render the html footer fragment for the completion.
|
void |
renderHeader(Response response)
Render the html header fragment for the completion.
|
void render(T object, Response response, String criteria)
Response.write(CharSequence)
.object
- completion choice objectresponse
- response objectcriteria
- text entered by user so farvoid renderHeader(Response response)
Response.write(CharSequence)
.response
- void renderFooter(Response response, int count)
Response.write(CharSequence)
.response
- count
- The number of choices rendereddefault void detach()
detach
in interface IDetachable
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.