I did some testing also.
Using 2.1.8 with with the following:
sUsername (form field name and instance field name in the ActionSupport
class)
public String getsUsername
public void setsUsername
doesn't work as the setsUsername method doesn't get called on form
submission.
Using 2.1.6 with t
Instead of
public String getsUsername() ...
public void setsUsername(String sUsername) ...
try
public String getSUsername()... [note the capital S]
public void setSUsername()...
Struts 2 will look for and then use a set method that follows the JavaBean
convention to set the value f
I'm using eclipse code to generate the getters and setters.
private String sUsername;
public String getsUsername() {
return sUsername;
}
public void setsUsername(String sUsername) {
this.sUsername = sUsername;
}
My getter / setter is correct.
Besides, changing the getter / setter is not
2009/10/30 KamHon Eng :
> private String sUsername;
> public String getsUsername() {
> return sUsername;
> }
> public void setsUsername(String sUsername) {
Setter/getter should be set/getSUsername, try that way
Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/
4 matches
Mail list logo