Hello together,

I got an problem with input components like <h:selectBooleanCheckbox> when i use the attribute disabled=true. My scenario is that i have two checkboxes. The second is initially set to disabled=true. Now the user should only get access to the second if he changed the value of the first before.
My approach was, if the user changed the value of checkbox1 then i set the 
attribute of checkbox2 via javascript to disabled=false.

Example:
<h:selectBooleanCheckbox id="checkbox1" onchange="var 
element=document.getElementById('checkbox2'); if(element.disabled) element.disabled = false; else 
element.disabled = true;">

<h:selectBooleanCheckbox id="checkbox2" disabled="false"/>

On the first it looks good, after the user has changed the value of the first 
checkbox, the second is now accessible via html.
But it looks that the value is doesn't send in the request to the server, like 
the normal behavior for an input element with disabled=true.

It is not enough to set disabled=false in HTML to get the value of checkbox2 to 
the server?


Thanks,
Luca




Reply via email to