Hopefully by now you've read the aforementioned JavaBeans
specification.  It does say that if the method name has two
consecutive capital letters after get and set, the property name is
not de-capitalized.  So, for your method getSTitle, the property name
should also be STitle.  If the name of your method were getSoTitle,
the property name would be soTitle.

-- Jeff

On 8/2/05, Swapnil Patil <[EMAIL PROTECTED]> wrote:
> My code is like this.
> public class GraphStep1Form extends ActionForm
> {
>     String sTitle;
>     boolean bTest;
>     Collection col;
> 
>     public boolean isBTest() {
>         return bTest;
>     }
>     public String getSTitle() {
>         return sTitle;
>     }
>     public void setSTitle(String title) {
>         sTitle = title;
>     }
>     public void setBTest(boolean test) {
>         bTest = test;
>     }
> 
>     public Collection getCol() {
>         return col;
>     }
>     public void setCol(Collection col) {
>         this.col = col;
>     }
> }//end GraphStep1Form
> 
> config.xml
> <form-bean name="GraphStep1Form" type="GraphStep1Form"/>
> 
> <action path    ="/DisplayGraphStep2"
>      type ="DisplayGraphStep2"
>      name = "GraphStep1Form"
>      scope ="request">
>    <forward  name="success" path="/graphStep2.jsp"/>
> </action>
> 
> jsp file
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <HTML>
> <BODY>
>         <html:errors/>
>         <html:form action="/DisplayGraphStep2">
>                 Username:<html:text property="col"/>
>                 <HR>
>                 Password:<html:text property="bTest"/></TD>
>                 <HR>
>                 <html:submit/>
>         </html:form>
> </BODY>
> </HTML>
> 
> 
> I am getting Exceptiuon for
> <html:text property="bTest"/> and for
> <html:text property="sTitle"/>
> 
> but not for
> <html:text property="col"/>
> 
> On 8/2/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> > Swapnil Patil wrote:
> >
> > >I had tried with the variable names like
> > >String sTitle;
> > >boolean bTest;
> > >
> > ><html:text property="sTitle"/>
> > ><html:text property="bTest"/>
> > >and both times I got same type of exception. but supricing it works for
> > ><html:text property="col"/> ( col is declared as Collection in the Form)
> > >
> > >
> > You must follow the JavaBean naming conventions. For sTitle what does
> > your getter look like?
> >
> > Dave
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to