Uploaded image for project: 'Seam Faces'
  1. Seam Faces
  2. SEAMFACES-166

UIValidateForm doesn't set the rendererType property correctly

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.0.1
    • Fix Version/s: 3.0.2
    • Labels:
      None
    • Environment:

      Tomcat 7.0.5, MyFaces 2.0.5, Weld 1.1.0

      Description

      MyFaces emits some warning when <s:validateForm> is used on a page:

      30.05.2011 17:30:03 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
      WARNUNG: Unsupported component-family/renderer-type: org.jboss.seam.faces.ValidateForm/javax.faces.Text
      30.05.2011 17:30:03 org.apache.catalina.core.ApplicationContext log
      INFO: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /validation.xhtml][Class: javax.faces.component.html.HtmlForm,Id: j_id98696035_5e1fb46][Class: org.jboss.seam.faces.component.UIValidateForm,Id: j_id98696035_5e1fb24]} (component-family=org.jboss.seam.faces.ValidateForm, renderer-type=javax.faces.Text)
      30.05.2011 17:30:03 javax.faces.component.UIComponentBase getRenderer
      WARNUNG: No Renderer found for component {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /validation.xhtml][Class: javax.faces.component.html.HtmlForm,Id: j_id98696035_5e1fb46][Class: org.jboss.seam.faces.component.UIValidateForm,Id: j_id98696035_5e1fb24]} (component-family=org.jboss.seam.faces.ValidateForm, renderer-type=javax.faces.Text)
      

      UIValidateForm doesn't render any output and therefore implements the encode*() methods with empty method bodies. The rendererType property has to be null for this methods to be used (direct implementation model for rendering components).

      The problem with UIValidateForm is that it is a subclass of UIInput. According to 4.1.6.2 the default value of the rendererType property for UIInput is javax.faces.Text. As UIValidateForm doesn't overwrite getRendererType() MyFaces uses the default value and therefore searches for a renderer for the component.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                chkal Christian Kaltepoth
                Reporter:
                chkal Christian Kaltepoth
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: