Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-2843

Check ui:composition and ui:decorate definition resolution

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.4
    • JSR-314
    • None

    Description

      This is the continuation of issue MYFACES-2753. The alternate issue on mojarra is here:

      https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1684

      The example that shows the problem is this:

      Top-level page (test.xhtml):
      ===========================
      <ui:composition template="inner_1.xhtml" >
      <ui:define name="test">
      <h:outputText value = "Defined in the Top Page"/>
      </ui:define>
      </ui:composition>

      First-level template (inner_1.xhtml):
      ====================================
      <ui:composition template="inner_2.xhtml">
      <ui:define name="test">
      <h:panelGroup>
      <ui:insert name ="test"/>
      <br/>
      <span>Defined in the first-level template</span>
      </h:panelGroup>
      </ui:define>
      </ui:composition>

      Second-level template (inner_2.xhtml):
      ======================================
      <ui:composition>
      <html>
      <body>
      <ui:insert name="test"/>
      </body>
      </html>
      </ui:composition>

      According to the reporter, this test should chain the resolution like ui:decorate does, but in the discussion of MYFACES-2753 it was described that the original authors intention is ui:composition works as is. In fact, there is a way to write the previous example using <ui:composition><ui:decorate> to make it work as expected.

      Anyway, I'll let this one open to keep it into account when we propose a template client api.

      Attachments

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              lu4242 Leonardo Uribe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: