javaserverfaces-spec-public
  1. javaserverfaces-spec-public
  2. JAVASERVERFACES_SPEC_PUBLIC-471

Enhance SelectItem to include itemTitle property and HTML label

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: 2.3
    • Component/s: Components/Renderers
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      471
    • Status Whiteboard:
      Hide

      cat2 renderkitdoc sig javadoc size_small importance_medium

      Show
      cat2 renderkitdoc sig javadoc size_small importance_medium

      Description

      Let me describe the use case that led me to file this enhancement request:

      On the project that I'm currently working on I needed to render a set of HTML
      checkboxes that have images as identifying labels instead of text. To enhance
      the usability of the checkboxes I also wanted to render a "title" element for
      each checkbox, so that the user would have a tooltip while hovering over the
      checkbox (this is legal according to the (X)HTML spec, and browsers pick up on it).

      Currently, neither of these is possible with JSF (I'm using 1.2_09). As a
      workaround, I rendered a seperate list of images and aligned everything using
      CSS. The downside is that the images aren't contained within the appropriate
      label tag, so clicking them doesn't affect the checkbox (this can be fixed with
      javascript, but that's a pain). I then coded up a replacedment for f:selectItem
      that extended the normal SelectItem, UISelectItem and SelectItemTag and included
      an itemTitle attribute.

      But it would be great if this was supported out of the box by JSF. Ideally, this
      should work:

      <f:selectItem itemValue="foo" itemTitle="bar">
      <h:graphicImage url="/images/foobar.png"/>
      </f:selectItem>

      which would then render:

      <label for="foobarid">
      <img src="/images/foobar.png" />
      </label>
      <input name="foobarselector" id="foobarid" value="foo" title="bar" type="checkbox">

      Would this be possible?

      Regards,
      Maarten

        Activity

        Hide
        Ed Burns added a comment -

        These are targeted at 2.1.

        Show
        Ed Burns added a comment - These are targeted at 2.1.
        Hide
        Ed Burns added a comment -

        target

        Show
        Ed Burns added a comment - target
        Hide
        Ed Burns added a comment -

        rogerk

        Show
        Ed Burns added a comment - rogerk
        Hide
        rogerk added a comment -

        triage rkit docs

        Show
        rogerk added a comment - triage rkit docs
        Hide
        rogerk added a comment -

        triage

        Show
        rogerk added a comment - triage

          People

          • Assignee:
            Unassigned
            Reporter:
            mdirkse
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: