Before I redo all my forms, are there any case sensitivity rules on
field names?
bean:
private String myloc = "en_gb";
private Boolean myLoc = Boolean.FALSE;
public String getMyloc() {
return myloc;
}
public void setMyloc(String myloc) {
this.myloc = myloc;
}
public Boolean getMyLoc() {
return myLoc;
}
public void setMyLoc(Boolean myLoc) {
this.myLoc = myLoc;
}
and in the jsp
<s:hidden name="personBean.myloc" value="en_gb" />
<s:checkbox name="personBean.myLoc" value="personBean.myLoc"
submitUnchecked="true" label="myLoc" />
For example, it only sets / calls setMyloc(String myloc) with false when
the checkbox is checked.
Although is says ognl is case sensitive?
I am sure this used to work.
###
Test :
https://github.com/gregh3269/struts-examples/tree/main-case
form-processing/test/register.action
Check with myLoc checkbox, unchecked it calls setMyloc(String myloc)
correctly with en_gb, checked it incorrectly calls the same with false.
Thanks.