I have a p:selectOneMenu
whose first element is a string 'Please select' and other items are a list to be selected. Can I disable the submit button when 'Please select' is selected and enable the button if other elements are selected? I know that itemDisabled
can be used, but that is not my requirement.
<p:selectOneMenu value="#{bean.value}" id="selectId"
filter="true" required="true" converter="itemConverter"
filterMatchMode="contains" height="120">
<f:selectItem itemLabel="Please select"/>
<f:selectItems value="#{listBean.selectItemList}"></f:selectItems>
</p:selectOneMenu>
Essentially, I want the submit button to be disabled when the first item is selected.
Can someone please help?