[
https://issues.apache.org/jira/browse/WW-4778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15947215#comment-15947215
]
Yasser Zamani commented on WW-4778:
-----------------------------------
Thank you for your post!
Please see the following section of [Struts 2.3 to 2.5
migration|https://struts.apache.org/docs/struts-23-to-25-migration.html]
{noformat}
Field names
If you have field names which starts with single lower case letter, for example:
private String sTrng;
public String getSTrng() {...}
public void setSTrng(String str) {...}
change accessors to getsTrng and setsTrng.
Or better yet, change field names to not contain single lower case letter:
private String strng;
public String getStrng() {...}
public void setStrng(String str) {...}
For additional info see WW-3909.
{noformat}
Sorry, it was a bug in capitalisation logic, see WW-3909 and WW-4616. OGNL
didn't follow JavaBean Specification, see {noformat}8.8 Capitalization of
inferred names{noformat} chapter.
> Property binding does not work correctly for attribute lName with setter
> setLName()
> -----------------------------------------------------------------------------------
>
> Key: WW-4778
> URL: https://issues.apache.org/jira/browse/WW-4778
> Project: Struts 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.3.31
> Environment: did NOT appear in struts2.3.15.3, and now appears in
> struts2.3.32
> Reporter: Markus Bohr
> Fix For: 2.3.28
>
>
> Property binding does not work correctly for attribute lName with setter
> setLName()
> (camel case problem in ONGL???? couldn't check this out in detail due to lack
> of time...)
> workaround: lName renamed to lastName and setLName() renamed to setLastName()
> Method setLastName() is recognized correctly (name of method keyed inside
> methodsByPropertyName of OnglRuntime.get(Class clazz, String propertyName)
> for key "lastName" is "setLastName" as expected), whereas setLName() is not
> (name of method keyed inside methodsByPropertyName for key "lName" is "get")
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)