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 [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL 
PROTECTED],[EMAIL PROTECTED]

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>


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Laurie Harper
Sent: Monday, September 26, 2005 1:48 PM
To: user@struts.apache.org
Subject: Re: using el to assign value of collection attribute in
<html:options>


Lim Hock-Chai wrote:
> is there a way to use el to assign value of collection attribute in 
> <html:options> tag?

Sure, just use <html:options collection="${some expression}"/>. Of 
course this assumes that you're using a JSTL-capable Servlet container 
or that you're using the -el version of the HTML taglib.

If you're having problems, post details of your configuration, what 
you've tried and what went wrong.

L.


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


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

Reply via email to