Ok there has got to be a better way to fix it than this:


        <html:select property="specialdatetypeLinkno">
                <logic:iterate id="specialdatetypeEntry"
name="specialdateForm" property="specialdatetypeList"
type="com.trams.struts.cbplus.SpecialdatetypeForm">
                <html:option
value="<%=Integer.toString(specialdatetypeEntry.getSpecialdatetypeno())%>">
                        <bean:write name="specialdatetypeEntry"
property="specialdatetype" />
                </html:option>
        </logic:iterate>


Anthony

-----Original Message-----
From: Anthony Martin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 11:50 AM
To: '[EMAIL PROTECTED]'
Subject: ArrayList of beans


Any idea why the following...

        --Snip: ActionForm BEGIN--

        // List of values
        private List specialdatetypeList = new ArrayList() ;

        // Specified by: interface Specialdate
        public List getSpecialdatetypeList ( ) { return
this.specialdatetypeList ; }

        // Specified by: interface Specialdate
        public void setSpecialdatetypeList ( List specialdatetypeList ) {
this.specialdatetypeList = specialdatetypeList ; }

        --Snip: ActionForm END--
        --Snip: JSP BEGIN--

        <bean:define id="specialdatetypeList" name="specialdateForm"
property="specialdatetypeList"
type="com.trams.struts.cbplus.SpecialdatetypeForm" />
        <html:select property="specialdatetypeLinkno">
                <html:options collection="specialdatetypeList"
property="specialdateno" labelProperty="specialdatetype" />
        </html:select>

        --Snip: JSP END--

...produce the following error?

        --Snip: Error BEGIN--

        Internal Servlet Error:

        javax.servlet.ServletException: java.util.ArrayList
                at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
        .
        .
        .
        
        Root cause: 
        java.lang.ClassCastException: java.util.ArrayList
                at
_0002feditSpecialdate_0002ejspeditSpecialdate_jsp_18._jspService(_0002feditS
pecialdate_
        .
        .
        .
        --Snip: Error END--

I don't show it here, but I assign beans with getters and setters for
specialdateno and specialdatetype to each index of the ArrayList.


Anthony

It is by caffeine alone I set my mind in motion.
It is by the Beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.

Reply via email to