Hi,

I'm in some kind of a hurry, so I didn't check the bug list or the archive.
In case, that this is a known issue, just forget about it.

So here's the apparent bug:

I'm using a base form class with some static fields and the
getters and setters:


MyBaseForm extends ActionForm implements java.io.Serializable
{

    private static List someLabels = new ArrayList();
    private static List someValues = new ArrayList();
    private static String value = null;

    public static final void setSomeLabels(List someLabels_param)
    {
        someLabels = someLabels_param;
    }

    public static final List getSomeLabels()
    {
        return someLabels;
    }

    public static final void setSomeValues(List someValues_param)
    {
        someValues = someValues_param;
    }

    public static final List getSomeValues()
    {
        return someValues ;
    }

    public static final void setValue(String value_param)
    {
        value= value_param;
    }

    public static final String getValue()
    {
        return value;
    }

    
}

Then I have another form class 
MyNewFormClass extends MyBaseForm implements java.io.Serializable
{
 //...
}

When I use MyNewFormClass within an JSP with the select/options tag
(
<TD vAlign=top>
    <html:select property="value" size="1">
        <html:options property="someValues" labelProperty="someLabels"/>
    </html:select>
</TD>

I get the following error message:

Root cause: 

javax.servlet.jsp.JspException: No getter method available for property someValues for 
bean under name null
        at org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:360)


However, this does not happen, when the getters are not static!

So, is this a bug? I guess, because it doesn't allow me an important feature (static 
getters for static fields).
Well, I can make my way around by doubling the getters: once static and once not 
static....

Holger

Reply via email to