Posts

Showing posts from January, 2012

Struts Tag: Create Combobox using ArrayList of String

How to iterate ArrayList of String. Suppose you have an ArrayList which contains only String. Many times the situation comes that ArrayList contains object of EMP class. or object of City and Stage.  In this case iterating using logic:iterate is very easy. But if you want to iterate ArrayList of String then create combobox then it is difficult. -------------------------- -------------------------- ArrayList myArrayList = new ArrayList(); myArrayList.add("Anil"); myArrayList.add("Saurabh"); myArrayList.add("Eshwar"); myArrayList.add("Sudeepta"); In jsp you can following lines of struts tag library. <td align="left"> <b>Table Combobox</b>     <html:select styleId="tableName" property="tableName" value="aName" onchange="">                  <option value=''>Select Table</option>                 <html:options name="tableNameArra...