Transient variables are not captured properly on form submission
Posted
by Kalpana
on Stack Overflow
See other posts from Stack Overflow
or by Kalpana
Published on 2010-06-05T07:06:28Z
Indexed on
2010/06/05
7:12 UTC
Read the original article
Hit count: 219
java
My User entity class have several member variables (e.g. String firstName) which are persisted and some transient variables (e.g. transient boolean selected) which are not. I have used the transient variable to capture a checkbox selection, but invariably the value never gets set and procesed properly until I set another bean value along with it. i.e. If User has firstName (mapped to a text field) and selected (mapped to a checkbox) If I just selected the value doesn't seem to be set on an update If I had selected the checkbox and the firstName field, the "selected" value is captured properly
Can anyone tell me why this is happening?
© Stack Overflow or respective owner