This content has been marked as final.
Show 2 replies
-
1. Re: rich:select null value problem
michpetrov May 18, 2015 5:37 AM (in response to martam)1 of 1 people found this helpfulThere is a validator in place that invalidates null values if the label is not empty or if it's not the default one. In 4.3.x if you selected a null value the input would be blank (it wouldn't show the label), I don't know if that was intentional but the method that did it is not executed in 4.5.x.
-
2. Re: rich:select null value problem
martam May 20, 2015 5:28 AM (in response to michpetrov)I haven't noticed the defaultLabel parameter before. When I add defaultLabel parameter to my rich:select with the value same as for null value, it seems to work correctly.
<rich:select id="id1" value="#{object.property}" converter="#{propertyConverter}" defaultLabel="-- no value --"> <f:selectItem itemLabel="-- no value --" itemValue="#{null}" /> <f:selectItems value="#{myBean.propertyValues}" var="prop" itemValue="#{prop}" itemLabel="#{prop.description}" /> </rich:select>
Is this a right way of using this parameter?