File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Setters not being called? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Setters not being called?" Watch "Setters not being called?" New topic
Author

Setters not being called?

John Bartlett
Ranch Hand

Joined: Jan 25, 2006
Posts: 116
I was wondering whether anyone has ever had any problems where the setters in your beans not being called?

On one of my JSF pages for some unknown reason the setters are never being called, meaning the default value is left as the attributes value.

I have checked all the bean references and variable namings, and there is nothing wrong with any of them, seems odd that only the getters seem to be getting called.

Is there any bugs or common mistakes that can cause this kind of problem?

Any information would be much appreciated.

Thank you,

John Bartlett
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

I've had problems when I used the wrong scope. I'd send out stuff with Request scope, not realizing that when it came back, a whole new request scope object was being constructed and the original data had already gone out of scope and been discarded.


Customer surveys are for companies who didn't pay proper attention to begin with.
John Bartlett
Ranch Hand

Joined: Jan 25, 2006
Posts: 116
I am using session scope for all my beans, shouldnt this sort out any of these problems?

John
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Setters not being called?