Well... JSF does, at least, add confusion. With pure HTML all inputs use the <input> tag and it is documented (http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.4 ) that the readonly attribute is "-- for text and passwd --"... conversly with JSF there are separate tags for radiobuttons, checkboxes, etc. and the documentation (and tld) clearly states that the readonly attribute is a viable attribute for these tags. ( http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/) and, in fact, describes its behavior as "Flag indicating that this component will prohibit changes by the user...".

So I would argue that it does have 'something' to do with JSF. It's in the docs and it's in the tld so why would users not expect it to work? That it doesn't work on standard HTML elements isn't good enough - JSF tags do 'other' things that standard tags do not.

I'm only posting this because I fell victim to the same confusion that Matthias is experiencing.

On 12/8/05, Andrew Robinson < [EMAIL PROTECTED]> wrote:
It has nothing to do with JSF, it is an HTML limitation. The following
does not work in both firefox and IE:

<html>
        <body>
                <form>
                        <input type="radio" readonly="true" name="a">test</input>
                        <input type="radio" readonly="true" name="a">test2</input>
                        <input type="text" readonly="true" value="test2"/>
                </form>
        </body>
</html>

The radio buttons are editable, and the text box is not, so the
browser ignores the read only property on radio buttons.

-Andrew

On 12/8/05, Matthias Kahlau <[EMAIL PROTECTED]> wrote:
> Hi!
>
>
> Doesn't the readonly attribute work with tags like selectBooleanCheckbox,
> selectManyMenu, selectOneRadio? I have tested the attribute on many
> different tags, but it seems to work only with text input tags. Why?
>
> I use Nightly 20051130 (myfaces-all.jar).
>
>
> Regards,
> Matthias
>
>

Reply via email to