Click to See Complete Forum and Search --> : <html:optionsCollection>


Madhur
09-19-2007, 08:36 AM
Hi,
I have a problem with <html:optionsCollection>

In JSP
---------------------------------
<TD valign="top">
<html:select name="someForm" property="backGroundColor">
<html:optionsCollection name="someForm" property="backGroundColorTypes" />
</html:select>
</TD>
------------------------------------
In bean:
------------------------------------
private static List backGroundColorTypes;

private String backGroundColor;

static{
backGroundColorTypes = new ArrayList(3);
backGroundColorTypes.add(new LabelValueBean("Status", "Status"));
backGroundColorTypes.add(new LabelValueBean("Lines", " Lines"));
backGroundColorTypes.add(new LabelValueBean("White", "White"));
}
public static List getBackGroundColorTypes() {
return backGroundColorTypes;
}
public static void setBackGroundColorTypes(List backGroundColorTypes) {
someForm.backGroundColorTypes = backGroundColorTypes;
}
public String getBackGroundColor() {
return backGroundColor;
}
public void setBackGroundColor(String backGroundColor) {
this.backGroundColor = backGroundColor;
}

---------------------------


but i'm getting a error:

----------------------
[2007-09-19 16:39:18,558][ERROR][http-8080-Processor24] - [org.apache.struts.taglib.tiles.InsertTag] ServletException in '/tiles/PopupLayout.jsp': ServletException in '/tiles/actualBody.jsp': No getter method available for property backGroundColor for bean under name org.apache.struts.taglib.html.BEAN
javax.servlet.ServletException: ServletException in '/tiles/actualBody.jsp': No getter method available for property backGroundColor for bean under name org.apache.struts.taglib.html.BEAN

------------------------------------

Can anyone of you help me to find the problem ...it would be very helpful

Thanks in advance..