Re: Should disabledClass be applied to select element too?

From: Michael Youngstrom <>
Date: Wed, 14 Sep 2005 17:37:21 -0600

Perhaps I didn't explain the problem correctly before. Let me try again. :)

This JSF 1.1 code:

<h:selectManyListbox disabledClass="grey" disabled="true">
     <f:selectItem itemValue="10" itemLabel="Test"/>

Will render to HTML like this:

<select name="_id1" multiple="multiple" disabled="disabled">
     <option value="10" class="grey">Test</option>

This is how I would expect it to be rendered:

<select name="_id1" multiple="multiple" disabled="disabled" class="grey">
     <option value="10" class="grey">Test</option>

So the disabled attribute is getting correctly passed through. The
problem I'm having is the selectManyListbox disabledClass="grey" is
only getting applied to the option elements and not the select
element. Perhaps I'm misunderstanding the purpose of disabledClass
but my thought was that disabledClass was used as a style to apply to
a disabled element to make it look disabled when the element is
disabled since not all browsers grey out disabled form elements when
they're disabled.

So the problem I'm having is the select multiple form element is not
getting the "grey" style rendered to make it look disabled when I
disable it. Only the options are getting the disabledClass style
applied. So, my question is can the MenuRenderer be changed to apply
the disabledClass style to the select element as well as the options
if the component is disabled?