struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Srinivas_Birag...@3com.com
Subject Re: No getter method for property
Date Mon, 14 Aug 2006 14:38:42 GMT




I think you are missing <form-property for perEtrDateNaissanceStr in
form-bean tag....

try the following code...
<form-bean type="com.myapp.EditPersonneEtrangereForm"
name="editPersonneEtrangereForm">
<form-property name="perEtrDateNaissanceStr"  type="java.lang.String"/>
</form-bean>

Thanks,
Srinivas.




                                                                           
             "Daoud Abdelmonem                                             
             Faleh"                                                        
             <abdelmonem.faleh                                          To 
             @gmail.com>               "Struts Users Mailing List"         
                                       <user@struts.apache.org>            
             08/14/2006 06:07                                           cc 
             PM                                                            
                                                                   Subject 
                                       No getter method for property       
             Please respond to                                             
               "Struts Users                                               
               Mailing List"                                               
             <user@struts.apac                                             
                  he.org>                                                  
                                                                           
                                                                           




Hello folks,

I use struts 1.2.9 and deploy to oc4j 10.1.3

My struts-config.xml containes:
...
<form-bean type="com.myapp.EditPersonneEtrangereForm"
name="editPersonneEtrangereForm"/>
...
<action input="/user/jsp/personneEtrangere/PersonneEtrangereDetails.jsp"
type="com.myapp.EditPersonneEtrangere" validate="false"
scope="request" path="/editPersonneEtrangere"
name="editPersonneEtrangereForm">
            <set-property property="cancellable" value="true"/>
            <forward path="/listAllPersonneEtrangere.do" name="cancel"/>
            <forward path="/listAllPersonneEtrangere.do" name="edited"/>
</action>
...

PersonneEtrangereDetails.jsp has:
....
<html:form action="/editPersonneEtrangere.do">
....
<td width="76%"><html:text styleClass="ReadOnlyTextField"
property="perEtrDateNaissanceStr" onchange="isDate(this.value)"
maxlength="10"/>
....

public class EditPersonneEtrangereForm extends
org.apache.struts.action.ActionForm {
....
private Date perEtrDateNaissance;
private String perEtrDateNaissanceStr;
...
    public String getPerEtrDateNaissanceStr() {
        return
        SQLDateConvertor.convertDateFormat(getPerEtrDateNaissance(),"dd/MM/yyyy");

        //return perEtrDateNaissanceStr;
    }

    public void setPerEtrDateNaissanceStr(String perEtrDateNaissanceStr) {
        this.perEtrDateNaissanceStr = perEtrDateNaissanceStr;
        this.perEtrDateNaissance =
SQLDateConvertor.convertToSqlDateFormat(perEtrDateNaissanceStr,"dd/MM/yyyy");

    }
...


When i request PersonneEtrangereDetails.jsp I get the followin exception
javax.servlet.jsp.JspException: No getter method for property:
"perEtrDateNaissanceStr" of bean:
"com.myapp.EditPersonneEtrangereForm"

What am I doing wrong or missing?
Thanks folks.

--
"Le dieu n'est pas a craindre ; la mort ne donne pas de souci ; et
tandis que le bien est facile a obtenir, le mal est facile a
supporter."

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



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


Mime
View raw message