I have a list of 20,000 cities; I would like the user to provide at least 2
chars and then present him a'potential list'.

I managed to do this:

JSP

<s:autocompleter theme="simple" list="state" name="StateName"/>



Java:

public class autocompleter extends ActionSupport
{
  private List state;
  public String execute() throws Exception{
    state = new ArrayList();
    state.add("Bonn");
    state.add("Paris");
.
.
.
 
    return SUCCESS;
  }
  
   public List getState(){
    return state;
  }
}

as you can see, the autocompliter is based on the 'state' I initially
provided. But what if the list is huge???

Q: How can I invoke an action once the user types a letter (str) and the
string gets to the invoked-method (based on the str the method will invoke
the appropriate list)

thank you!!!
-- 
View this message in context: 
http://www.nabble.com/struts2%3A-how-to-read-the-%27potenrial-list%27-from-a-database-tp17810726p17810726.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to