Struts2 jQuery Autocompleter with select box

前端 未结 3 2049
忘了有多久
忘了有多久 2021-02-11 01:41

I\'ve used the Struts2 jQuery autocompleter for my Struts 2 application.

Here is my code:

JSP:

 

        
3条回答
  •  别那么骄傲
    2021-02-11 02:24

    You have typed wrong attribute that is not referenced.

    
    

    should be

     
    

    Use the list item bean class

    public class ListValue {
      private String id;
      private String name;
    ...
    }
    
    public String populate() throws Exception {
      itemList.add(new ListValue("Php", "Php"));
      itemList.add(new ListValue("Java","Java") );
      itemList.add(new ListValue("Mysl", "Mysl") );
      return SUCCESS;
    }
    

    assumed that constructor and mutators have been added.

提交回复
热议问题