struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Olszynski" <m.olszyn...@proway.de>
Subject Re: no getter method exception
Date Fri, 20 Dec 2002 12:27:06 GMT
But how shall I make indexed getters and setters? A lot of guys told me that
I do have to make indexed getters and setters in my formbean, otherwise I
get an indexoutofboundsexception. (See my last 5 posts on benutils.populate)

Do you have any idea how to solve this problem?

Thanks a lot Michael
--
Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
Entwickler!
----- Original Message -----
From: "Andrew Hill" <andrew.david.hill@gridnode.com>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Friday, December 20, 2002 1:22 PM
Subject: RE: no getter method exception


> Ah think I see your problem. Its not that you dont have a getter, its that
> you have too many!
> The bean introspection stuff gets funny about multiple getters and setters
> and often refuses to recognise the property :-(
>
> Afaik multiple getters and setters is agaisnt the JavaBean spec. If you
ask
> me the spec is a damn pain in this regard, but thats the way it is.
>
> -----Original Message-----
> From: Michael Olszynski [mailto:m.olszynski@proway.de]
> Sent: Friday, December 20, 2002 20:13
> To: 'Struts Users Mailing List'
> Subject: no getter method exception
>
>
> Hi I get a no getter method exception (stackTrace below)
>
> But I do have the getter method!!!
>
>
>
> This is my Formbean:
>
> public class TimeProofFormBean extends ActionForm {
>
>    private Vector timeProofList = new Vector();
>
>   public Vector getTimeProofList() {
>      System.out.println("getTimeProofList()");
>         return this.timeProofList;
>     }
>
>     public void setTimeProofList( Vector v ) {
>     System.out.println("setTimeProofList( Vector v )");
>         this.timeProofList = v;
>     }
>
>    // getter for indexed property
>
>   public Object getTimeProofList(int index) {
>   System.out.println("public Object getTimeProofList(int index) "+index);
>      if (index >= timeProofList.size())
>        return new TimeProofTableBean();
>      return timeProofList.get(index);
>    }
>
>
>     // setter for indexed property
>
>    public void setTimeProofList(int index,  Object value) {
>      System.out.println("setTimeProofList(int index, Object value) ");
>      int size=timeProofList.size();
>      if (index >= size) {
>        for(int i=size; i<=index; i++) {
>          timeProofList.add(new TimeProofTableBean());
>        }
>      }
>      timeProofList.set(index,value);
>    }
>
> }
>
>
> 13:06:10,823 ERROR [Engine]
> ApplicationDispatcher[/Zeiterfassung_Applikation] Se
> rvlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: No getter method for property
> timeProofList o
> f bean timeProofForm
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:248)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
> 89)
>         at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
> atcher.java:684)
>         at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
> ispatcher.java:575)
>         at
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
> patcher.java:498)
>         at
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary
> .java:820)
>         at
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
> a:395)
>         at
> org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:191)
>         at
> org.apache.jsp.template_jsp._jspx_meth_template_get_4(template_jsp.ja
> va:221)
>         at
> org.apache.jsp.template_jsp._jspx_meth_html_html_0(template_jsp.java:
> 118)
>         at org.apache.jsp.template_jsp._jspService(template_jsp.java:62)
>         at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> .java:204)
>         at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:2
> 89)
>         at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
> atcher.java:684)
> --
> Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den
> Entwickler!
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message