|
I get the following error when trying to use el to assign value to collection
attribute in struts's html:options:
javax.servlet.ServletException: Cannot find bean under
name
[com.my.DAO.AttrColorDTO@10eeb26,com.my.DAO.AttrColorDTO@704cf5,com.my.DAO.AttrColorDTO@cc7f9e,com.my.DAO.AttrColorDTO@1ce5e7a,com.my.DAO.AttrColorDTO@19cd5f5]
Below is what the struts html:options looks like:
<html:select property="color" >
<html:options collection="${jspHelper.attrList.attrColorDTOList}"
property="ID" labelProperty="shortDesc"/>
</html:select>
However, it work when I do the following:
1) save the attrColorDTOList to a session:
session.setAttribute("attrColorDTOList"
jspHelper.getAttrList().getAttrColorDTOList)
2) In jsp:
<html:select property="color" >
<html:options collection="attrColorDTOList" property="ID"
labelProperty="shortDesc"/>
</html:select>
Any idea why the first method is not working?
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.