this code here will suffice! i used a CountryDatabase class 4 the dataaccess.
Steps:
1-store data in array list
2.0-use iterator to move thru recs
  2.1 as u movethru recs, display the Country Name

-->note the positioning of the <select> tag
-------------------------------------------------------------------------------------------
<select>
<%
                                                try{
                                                        int country;            
                                
                                                        CountryDatabase db = 
new CountryDatabase();
                                                        ArrayList<Country> objs 
= db.getCountryByCountryName("");
                                                        
                                        
                                                        if (objs != null){
                                                                
Iterator<Country> oList = objs.iterator();
                                                                
                                                                
while(oList.hasNext()){
                                                                        Country 
Country = oList.next();
                                                                        %>

        <option>
                <%= Country.getCountryName() %>
        </option>

<%}     
                }
        }catch (Exception e){
                        //error handling code here              
                        }       
                                                
%></select>
-- 
View this message in context: 
http://www.nabble.com/Populating-a-drop-down-with-dynaactionform-arrayList-tp15839874p19185454.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


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

Reply via email to