FileDocCategorySizeDatePackage
AutocompleterExampleAction.javaAPI DocApache Struts 2.0.9 Apps896Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.ajax

AutocompleterExampleAction

public class AutocompleterExampleAction extends com.opensymphony.xwork2.ActionSupport

Fields Summary
private String
select
private List
options
private static final long
serialVersionUID
Constructors Summary
Methods Summary
public java.lang.Stringexecute()


       
    if ("fruits".equals(select)) {
      options.add("apple");
      options.add("banana");
      options.add("grape");
      options.add("pear");
    } else if ("colors".equals(select)) {
      options.add("red");
      options.add("green");
      options.add("blue");
    }
    return SUCCESS;
  
public java.util.ListgetOptions()

    return options;
  
public java.lang.StringgetSelect()

    return select;
  
public voidsetSelect(java.lang.String select)

    this.select = select;