Comments below:

On 12/7/05, Andrew Robinson <[EMAIL PROTECTED]> wrote:
Many thick client controls have the same properties. The usual
debate/answer that I find is this:

1) if the control should never be edited, mark it as read-only
2) if the control is temporarily disabled (i.e. you need to select a
radio button to enable the associated controls), then use disabled.

In general, a read-only controls is something to display data, not a
form control for submitting data. Since radio buttons and check boxes
are rarely ever used for display only, then it may make sense that
they do not support a read-only state.

Ah! But they do support it. According to the selectBooleanCheckbox documentation (found at http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/) the readonly attrib is a:
" Flag indicating that this component will prohibit changes by the user. The element may receive focus unless it has also been disabled."

I'm guessing this is a bug.

The statement above indicates that the "disabled" attrib will also prevent focus on the component (in addition to modifying its visual props).

So maybe that's it... "readonly" allows focus and doesn't modify visual properties, "disabled" does not allow focus and does change visual props...

Any further comments or clarifications are welcome.

My $0.02
-Andrew


Bobby
 

Reply via email to