Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 10346 invoked from network); 22 Apr 2002 17:17:44 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 22 Apr 2002 17:17:44 -0000 Received: (qmail 2252 invoked by uid 97); 22 Apr 2002 17:17:34 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 2232 invoked by uid 97); 22 Apr 2002 17:17:33 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 2221 invoked from network); 22 Apr 2002 17:17:32 -0000 Message-Id: <5.1.0.14.0.20020422100415.00a8b1a0@mail.pwebtech.com> X-Sender: dante%electronicingenuity.com@mail.pwebtech.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 22 Apr 2002 10:15:46 -0700 To: "Struts Users Mailing List" From: Dante Briones Subject: Re: Problem with property in ActionForm In-Reply-To: <20020422165351.U25626-100000@friet.first8.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N This is a feature of the JavaBeans property naming standards that allows you to have an all-caps property name. To quote from the JavaBeans specification: -- Java programmers are accustomed to having normal identifiers start with lower case letters. Vigorous reviewer input has convinced us that we should follow this same conventional rule for property and event names. Thus when we extract a property or event name from the middle of an existing Java name, we normally convert the first character to lower case. However to support the occasional use of all upper-case names, we check if the first two characters of the name are both upper case and if so leave it alone. So for example, "FooBah" becomes "fooBah" "Z" becomes "z" "URL" becomes "URL" -- So you would have to refer to the property on the jsp as "ACompanyId" in order to use the property as coded below. Or you could rename the property something like "AdminCompanyId". HTH, db At 04:54 PM 22/4/2002 +0200, you wrote: >Hi all, > >I seem to have found a strange bug in Struts (or I need more coffee). > >I have an ActionForm with a property "aCompanyId" (the 'a' stands for >admin), and thus have the following members: >public Integer aCompanyId; >public Integer getACompanyId(); >public void setACompanyId( Integer someId ); > >But, when I try to reference this form in a .jsp using >, I get the following error: javax.servlet.ServletException: No getter >method for property aCompanyId of bean org.apache.struts.taglib.html.BEAN >The strange part is that if I change the name of the property and the form >methods to "aaCompanyId" and "getAaCompanyId()" etc it *does* work. What's >wrong here? Greetings, Arjan Lamers >--------------------------------------------- Notice: The only person >getting his work done by Friday was Robinson Crusoe. -- To unsubscribe, >e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: