-
Nov 15th, 2006, 01:20 PM
#1
drop down
I am not able to load data on start up.
Here is my Dictionary class:
public class Dictionary implements ServletContextAware, InitializingBean {
protected ServletContext context;
Map statesList = new HashMap();
public void setServletContext(ServletContext servletContext) {
context = servletContext;
}
private CacheDAO cacheDao;
public CacheDAO getCacheDao(){
return this.cacheDao;
}
public void setCacheDao(CacheDAO dao){
this.cacheDao = dao;
}
public void afterPropertiesSet() throws Exception {
List states = cacheDao.getAllStates();
this.statesList.put("states", states);
}
}
and below is my jsp snippet
<td>
<select name="stts">
<c:forEach items="${states}" var="stat">
<option value = "${stat.stateName}"> ${stat.state}</option>
</c:forEach>
</select>
</td>
The drop down is empty.
What am I missing? How should my spring config file look?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules