Meaningless Drivel is fun!
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
JavaRanch » Java Forums » Java » JSF
Bookmark "Setters not being called?" Watch "Setters not being called?" New topic

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: 17417

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.

An IDE is no substitute for an Intelligent Developer.
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?

I agree. Here's the link:
subject: Setters not being called?
jQuery in Action, 3rd edition