The SELECT tag is a standard drop-down box that generates <select> tags in HTML. The qutocomplete tag is a drop-down box with AutoComplete to filter the contents of the drop-down box based on what is filled in. using the AutoComplete tag must use the Ajax theme because it uses the Dojo JavaScript library.
1 <Body>2 <%3 List<String>provincelist= NewArrayList<String>(); //List Object, Store province4 Provincelist.add ("Beijing"); //Add Data5 Provincelist.add ("Shanghai");6 Provincelist.add ("Tianjin");7 Provincelist.add ("Chongqing");8 Provincelist.add ("Hebei");9 Provincelist.add ("Henan");Ten Provincelist.add ("Shandong"); One Provincelist.add ("Shanxi"); A Provincelist.add ("Jiangsu"); - Provincelist.add ("Zhejiang"); - the Request.setattribute ("provincelist", provincelist); //put it in the request. - %> - - <Struts:formAction= "Login"> + <Struts:selectname= "Province"label= "Please select Province"List= "%{#request. provincelist}" /> - <Struts:autocompletername= "Province"label= "Please select Province"List= "%{#request. provincelist}" /> + </Struts:form> A at </Body>
Select, AutoComplete label drop-down box