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

<t:messages> NPEs if the 'for' attribute on <h:outputLabel> is missing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.2-SNAPSHOT
    • 1.1.3
    • Message(s)
    • None
    • Doesn't matter.

    Description

      If you use the <t:messages> tag in conjunction with <h:outputLabel> without specifying the 'for' attribute, the page will not render and an exception will be thrown:
      java.lang.NullPointerException: expr
      at javax.faces.component.UIComponentBase.findComponent(UIComponentBase.java:210)
      at org.apache.myfaces.renderkit.html.ext.HtmlMessageRenderer.createOutputLabelMap(HtmlMessageRenderer.java:200)

      This could be easily avoided by declaring the 'for' attribute as required in the TLD.

      Attachments

        Activity

          People

            mkienenb Mike Kienenberger
            vace117 Val Blant
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: