jsf 2 - JSF 2.0 Primefaces -
I Below is the code (primefaces 4): "post-text" itemprop = "text"> answer this question here Given: (see Answer to Balsus) & lt; P: selectOneRadio & gt; is using Boolean (wrapper class) property, so while the property is displayed with zero, the radio button is unchecked (which is correct), but when clicking on the save button, the default On choosing any option (yes / no) by false, it is also set in the property and after saving, 'no' is being selected.
& lt; P: selectOneRadio value = "# {myBean .hasMyBooleanProperty}" & gt; & Lt; F: select item item label = "yes" item value = "# {true}" /> & Lt; F: select item item label = "no" item value = "# {false}" /> & Lt; / P: selectOneRadio & gt;
Add-Dorg.apache.el .parser.COERCE_TO_ZERO = false Fix it in your system properties Will do it. Make sure Boolean property is
boolean type and not old.
Comments
Post a Comment