Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-452

<t:messages> tag doesn't work for input fields found in dataTables

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1.2
    • None
    • None
    • None

    Description

      If you try to use an output label for an input field in a dataTable, the label will not be found due to an error in HtmlMessageRenderer.createOutputLabelMap()

      The input field's client id is originally added to FacesContext during the validation phase (if the validator fails) with input field's client id containing the row index (ex.: "body:cropYearForm:1:holdbackThreshold").

      When HtmlMessageRenderer.createOutputLabelMap() constructs the index of all HtmlOutputLabels on the page, the same input field's client id does not contain the row index (ex. "body:cropYearForm:holdbackThreshold").

      As a result, the indexed MessageLabelInfo is never found in HtmlMessageRenderer.findInputLabel(FacesContext facesContext, String inputClientId), b/c inputClientId contains the client id with the row index, whereas the key in outputLabelMap does not. (ex. "body:cropYearForm:1:holdbackThreshold" vs. "body:cropYearForm:holdbackThreshold").

      Perhaps something else should be used as the key in outputLabelMap?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vace117 Val Blant
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: