Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4048

label's wicket:for does not work completely for Radios

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC7
    • Fix Version/s: 1.5.1
    • Component/s: wicket
    • Labels:
      None

      Description

      The new functionality with <label wicket:for="..."> (See WICKET-1469) does not work completely for radio buttons, probably because the referenced Radio instance is no FormComponent but just a LabeledWebmarkupContainer.
      The problem is in AutoLabelResolver, line 181:
      if (component instanceof FormComponent)

      {...}

      There should be a special case for Radios to get its associated RadioGroup first and use that as component to derive the CSS class from

        Activity

        Hide
        ivaynberg Igor Vaynberg added a comment - - edited

        it doesnt really make sense to transfer required and error classes to the labels of the radios themselves, these are only relevant for the label of the radiogroup. i did, however, make it so that individual radio labels will get the 'disabled' class if the radio component itself is disabled.

        Show
        ivaynberg Igor Vaynberg added a comment - - edited it doesnt really make sense to transfer required and error classes to the labels of the radios themselves, these are only relevant for the label of the radiogroup. i did, however, make it so that individual radio labels will get the 'disabled' class if the radio component itself is disabled.

          People

          • Assignee:
            ivaynberg Igor Vaynberg
            Reporter:
            tapter Matthias Keller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development