Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.5
    • Component/s: None
    • Labels:
      None

      Description

      The readonly attribute can be defined on an h:selectBooleanCheckbox. However the HtmlCheckboxRenderer doesn't seem to ever look for this attribute.
      The same issue is present for t:selectBooleanCheckbox.

      1. readonlyAsDisabledForSelects.patch
        11 kB
        Dave Brondsema
      2. readonlyAsDisabledForSelects.patch
        11 kB
        Dave Brondsema

        Activity

        Hide
        Dave Brondsema added a comment -

        This applies to selectOneRadio also

        Show
        Dave Brondsema added a comment - This applies to selectOneRadio also
        Hide
        Dave Brondsema added a comment -

        And menus.

        Best suggestion so far is to use javascript and also check the values after submission to make sure they weren't changed. http://marc.theaimsgroup.com/?l=myfaces-user&m=113526364404136&w=2

        Show
        Dave Brondsema added a comment - And menus. Best suggestion so far is to use javascript and also check the values after submission to make sure they weren't changed. http://marc.theaimsgroup.com/?l=myfaces-user&m=113526364404136&w=2
        Hide
        Dennis Byrne added a comment -

        Same thing for @onblur and @onfocus for h:commandLink and t:commandLink . The RI does not do this.

        Show
        Dennis Byrne added a comment - Same thing for @onblur and @onfocus for h:commandLink and t:commandLink . The RI does not do this.
        Hide
        Dave Brondsema added a comment -

        This patch allows an init-param of org.apache.myfaces.readonlyAsDisabledForSelects, which causes all h:select* renderers to output disabled="disabled" when they are readonly. This is not as nice as the javascript solution because there are visual differences, but the effect is nearly the same.

        This is a configuration option because the JSF spec does not seem very clear what should happen with readonly="true" on a select component.

        I wasn't sure where to put documentation since this a configurable option.

        Show
        Dave Brondsema added a comment - This patch allows an init-param of org.apache.myfaces.readonlyAsDisabledForSelects, which causes all h:select* renderers to output disabled="disabled" when they are readonly. This is not as nice as the javascript solution because there are visual differences, but the effect is nearly the same. This is a configuration option because the JSF spec does not seem very clear what should happen with readonly="true" on a select component. I wasn't sure where to put documentation since this a configurable option.
        Hide
        Dave Brondsema added a comment -

        Updated patch for the current SVN structure

        Show
        Dave Brondsema added a comment - Updated patch for the current SVN structure
        Hide
        Dave Brondsema added a comment -

        Anyone want to apply this patch? Or do you think it needs some modification?

        Show
        Dave Brondsema added a comment - Anyone want to apply this patch? Or do you think it needs some modification?
        Hide
        Martin Marinschek added a comment -

        Thanks to Dave Brondsema for this patch. I added the option to MyFacesConfig.

        regards,

        Martin

        Show
        Martin Marinschek added a comment - Thanks to Dave Brondsema for this patch. I added the option to MyFacesConfig. regards, Martin

          People

          • Assignee:
            Martin Marinschek
            Reporter:
            Simon Kitching
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development