2 Replies Latest reply on Mar 26, 2007 7:27 PM by jgilbert

    EL not working across facelet include params

    jgilbert

      I am getting the following exception:

      java.lang.NullPointerException
       at org.jboss.seam.core.Expressions.getValidator(Expressions.java:198)


      Here is the scenario. I am trying to decompose my facelets into multiple reusable fragments. For example:

      EditPanel.xhtml

      <h:panelGrid ...>
       <h:outputLabel value="Code" for="code"/>
       <s:decorate>
       <h:inputText value="#{entity.code}" id="code"/>
       </s:decorate>
      </h:panelGrid>


      I then do an include in various places such as:

      <ui:include src="EditPanel.xhtml">
       <ui:param name="entity" value="#{myentity}" />
      </ui:include>



      The edit panel retrieves the data properly using #{myentity.code} leveraging the entity param.
      However, validation appears to ignore the param and uses #{entity.code} which returns null.

      Shouldn't this work or is it a seam enhancement? Obviously I can refactor my facelets to get around this, but it would be nice to leverage all the feature of facelets.