Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-585

af:tree Need better error message for missing form tag

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0-incubating-core
    • 1.0.0-incubating-core
    • None
    • None

    Description

      When an input component is used, but is not nested inside a <af:form> tag, ADF-Faces throws a NPE without any hint to the actual mistake.
      This situation should be detected, and an exception with a proper description should be thrown.
      Little issues like this one can cause hours of work for the beginning user like me or the other guy on the mailing list who posted this code:

      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
      
      <f:view>
         <af:document>
             <f:facet name="metaContainer">
                 <f:verbatim>
                     <meta http-equiv="expires" content="0" />
                     <meta http-equiv="pragma" content="no-cache" />
                     <meta http-equiv="cache-control" content="no-cache, must-revalidate" />
                 </f:verbatim>
             </f:facet>
      
             <af:tree var="node" value="#{treeModel.model}">
               
          <f:facet name="nodeStamp">
                 <af:outputText value="#{node.name}"/>
           </f:facet>
      
             </af:tree>
      
         </af:document>
      </f:view>

      Attachments

        Activity

          People

            adamwiner Adam Winer
            sfriedrich Stephen Friedrich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: