9 Replies Latest reply on Oct 31, 2006 1:16 PM by Gavin King

    Use of @Out with JSTL/ui:include

    Ed Kusnitz Newbie

      I have the following situation which seams to defy explanation:

      In my xhtml page, I have this:
      <c:if test="#{!MyBean.newObject}">
      <ui:include src="/pages/Details.xhtml" />
      <c:if test="#{MyBean.newObject}">
      <ui:include src="/pages/Choose.xhtml" />

      This works. However, if I outject the newObject variable instead and change the condition to test="#{newObject}", etc., it does the opposite of expected. But I can see the variable appearing correctly in the context. That is, I add
      newObject:<h:outputText value="#{newObject}"/>

      to the page to see the current value. This renders as expected, but the <c:if> logic follows the branch when the value is false and ignores it when it is true! Can anyone explain this?

      I also tried using the rendered attribute for <ui:include> but that seemed to be ignored in all cases -- traditional jstl or outjection. I read somewhere that this wasn't supported?