Struts2 jQuery Autocompleter with select box

前端 未结 3 1833
轮回少年
轮回少年 2021-02-11 01:49

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

Here is my code:

JSP:

 

        
3条回答
  •  青春惊慌失措
    2021-02-11 02:19

    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.

提交回复
热议问题