javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-749

SelectItemGroup: escape and disabled properties are ignored

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.2_09-b02
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      749

      Description

      The spec talks about SelectItemGroup supporting the additional property
      "selectItems".
      I think that should mean properties inherited from SelectItem are supported.
      In particular "escape" should be honored when rendering the label.
      "disabled" should also be honored since the HTML optgroup knows a disabled
      attribute and that is supported by browser just fine.

      I checked with selectOneListbox and at least the html renderer for that
      component just ignores these properties, see MenuRenderer.renderOptions()

        Activity

        Hide
        Ryan Lubke added a comment -

        Assigned.

        Show
        Ryan Lubke added a comment - Assigned.
        Hide
        Ryan Lubke added a comment -

        Looking into this further it won't be an issue to add the disabled attribute
        rendering, however, handling the escape property will.

        Typically the escape functionality has been for content rendered as element
        values not attributes. The ResponseWriter API handles the escape/non-escape
        element values by either calling writeText() or write(). But you can't do the
        same something similar for attributes because as soon as you call write() it
        will attempt to close any open elements.

        There is an open bug [1] against the spec as this issue impacts artifacts as well.

        [1] https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=237

        Show
        Ryan Lubke added a comment - Looking into this further it won't be an issue to add the disabled attribute rendering, however, handling the escape property will. Typically the escape functionality has been for content rendered as element values not attributes. The ResponseWriter API handles the escape/non-escape element values by either calling writeText() or write(). But you can't do the same something similar for attributes because as soon as you call write() it will attempt to close any open elements. There is an open bug [1] against the spec as this issue impacts artifacts as well. [1] https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=237
        Hide
        Ryan Lubke added a comment -

        Created an attachment (id=656)
        Proposed changes (version 1)

        Show
        Ryan Lubke added a comment - Created an attachment (id=656) Proposed changes (version 1)
        Hide
        Ryan Lubke added a comment -

        Committed changes to support the disabled property to the 1.2 and 2.0 code lines.

        Will defer on proper escape support until spec issue 237 is addressed.

        [1] https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=237

        Show
        Ryan Lubke added a comment - Committed changes to support the disabled property to the 1.2 and 2.0 code lines. Will defer on proper escape support until spec issue 237 is addressed. [1] https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=237
        Hide
        Ryan Lubke added a comment -

        Going to mark this as closed for now with the understanding that we'll work on
        getting the second part of this issue addressed in JSF 2.0 (as the current API
        is limited in this area).

        I should point out that once 1.2_09 is released, there are more options for
        escape handling based on the response stream encoding being used that may help
        resolve some of the escaping deficiencies, however, certain characters will
        always be escaped. Please see issue 751 [1] for details.

        Finally, I've logged a spec issue [2] to capture this issue. The Renderkit docs
        should explicit in the handling of these two properties.

        [1] https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=751.
        [2] https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=424

        Show
        Ryan Lubke added a comment - Going to mark this as closed for now with the understanding that we'll work on getting the second part of this issue addressed in JSF 2.0 (as the current API is limited in this area). I should point out that once 1.2_09 is released, there are more options for escape handling based on the response stream encoding being used that may help resolve some of the escaping deficiencies, however, certain characters will always be escaped. Please see issue 751 [1] for details. Finally, I've logged a spec issue [2] to capture this issue. The Renderkit docs should explicit in the handling of these two properties. [1] https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=751 . [2] https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=424
        Hide
        Manfred Riem added a comment -

        Closing issue out

        Show
        Manfred Riem added a comment - Closing issue out

          People

          • Assignee:
            Ryan Lubke
            Reporter:
            skelvin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: