Hi Stefano!

If you disable the control on the client, how should the server know? He assumes required=true so he expects a value from that component.
Try the server side disabled attribute or set required to false.

Tobias Kilian

Hi guys,

Who knows how to disable a "t:selectOneMenu" tag with the "required" attribute to "true" by a javascript function? In my code I have a javascript function to disable a SELECT tag with lines as:

document.getElementById ('idSelect').disabled = true;

or

document.getElementById('idSelect').disabled = "disabled";

Apparently it looks like good, but, server side, nothing works!
An error occurs: "Field required!"
How is it possible if this field is disabled?

The debug command "alert(document.getElementById('idSelect').disabled);" works and also I see "true".

The same example with an inputText tag everything works correctly, why with a "selectOneMenu" does not it work?

Thank you so much for your support!

Giampiero

Reply via email to