Tapestry
  1. Tapestry
  2. TAPESTRY-1647

Need to be able to render elements before and after form labels

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.6
    • Fix Version/s: 5.0.9
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      The ValidationDecorator interface allows you to render additional attributes on the label, elements before and after the field, and attributes on the field. Need to add beforeLabel() and afterLabel() methods.

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        This is not a big deal, with the provision that in western languages with left-to-right rendering, the label will usually precede the Field, which means that the error state of the field will not be known at the time the label renders.

        You can see built in logic to defer part of the rendering of the Label until the end of the Heartbeat, to a) link the Label to the Field (the Field will have a valid clientId after it renders) and b) to change the CSS class of the Label if the field is in error.

        To mark a field required may require similar logic, though required is more likely to be valid before the Field renders than its error state.

        Show
        Howard M. Lewis Ship added a comment - This is not a big deal, with the provision that in western languages with left-to-right rendering, the label will usually precede the Field, which means that the error state of the field will not be known at the time the label renders. You can see built in logic to defer part of the rendering of the Label until the end of the Heartbeat, to a) link the Label to the Field (the Field will have a valid clientId after it renders) and b) to change the CSS class of the Label if the field is in error. To mark a field required may require similar logic, though required is more likely to be valid before the Field renders than its error state.

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Dan Adams
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development