com.sun.j2ee.blueprints.ui.autocomplete
Interface Completable


public interface Completable

Interface implemented by classes which can provide completion results for a given prefix.


Method Summary
 void complete(javax.faces.context.FacesContext context, java.lang.String prefix, CompletionResult result)
          This method is called asynchronously from client javascript calls; it should return a short list of possible matches for the given prefix as an array of Strings.
 

Method Detail

complete

void complete(javax.faces.context.FacesContext context,
              java.lang.String prefix,
              CompletionResult result)
This method is called asynchronously from client javascript calls; it should return a short list of possible matches for the given prefix as an array of Strings. These are returned by adding them to the result object. These items will then be presented to the user in an auto complete popup.

Parameters:
context - The faces context for the JSF application
prefix - A string prefix to select matches from (note that the prefix may be empty in which case it may be natural to return the first N matches.
result - A result object; call addItem or addItems methods on CompletionResult to populate the completion result returned to the browser.