java - How to disable the single value from list in f:selectitems? -
<p:selectonemenu id="currency" value="#{element.selectedcurrency}"> <f:selectitem itemlabel="--n/a--" itemvalue="na:-1"></f:selectitem> <f:selectitems value="#{returnbodybean.selectedcurrency}" var="currency"/> <p:ajax listener="#{returnbodybean.oncurrencychange(element)}" update="datatypeconfigid,lovtypeid"></p:ajax> </p:selectonemenu>
the list in f:selectitems contains 3 values. want disable values in list based on selection of value in drop down. eg:- if change value in other dropdown, want disable 2 values in f:selectitems list. can please tell me how it?
you can't "disable" values in html selection list, need recreate list that's displayed, minus 2 values want removed.
set update="currency" attribute on other dropdown, have selectedcurrency method of bean generate list based on value selected in other dropdown.
Comments
Post a Comment