Dashboard > WebWork > ... > FAQ > Why does my setter not get called
  WebWork Log In View a printable version of the current page.  
  Why does my setter not get called
Added by Philip Luppens, last edited by Martin Gilday on Jan 04, 2007  (view change)
Labels: 
(None)

Why doesn't my setter get called ?

Aaron Johnson had a problem with a setter for a property that never seemed to get called. He had a getter/setter combination that did not match:

public void setUser(String username) {
    ...
}
public User getUser() {
    ...
}

The short answer is that your getter and setter must match the property type, or OGNL will not be able to call it (due to a reflection API semantics). You can read the full explanation here.

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request - Contact Administrators