I have JSF 1.1 page in which I have a <h:selectOneListbox. When I set property disabled=true, selected value in <h:selectOneListbox becomes null upon submitting the page.
<h:selectOneListbox size="1" id="prod" disabled="#{mybean.disable}"
How can I make sure value selected is not null even if property is set to disabled=true.
Thanks
When the
disabledattribute is set on a HTML input element, then it is not only uneditable, but it would also not send its name=value pair as request parameter to the server. That explains why the server retrievesnulls for them.If you want to make it uneditable, but still want to send its name=value pair as request parameter to the server, then you should be using
readonlyinstead.