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

Allow resolve #{cc} inside templates called from a composite component

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.12
    • 2.3.0-beta
    • None
    • None

    Description

      It has been reported this scenario:

      <cc:implementation>
           <ui:include src="#{cc.page}"/>
      </cc:implementation>
      

      In the included page:

      <ui:composition ...>
           <test:anoterCompositeComponent locale="#{cc.someProperty}"/>
      </ui:composition>
      

      The problem right now is such kind of indirection has not been taken into account for #

      {cc} EL resolution algorithm. It is supposed that any resolution of #{cc}

      happens inside the composite component .xhtml and not indirectly through a template like is happening in the previous example.

      This code leads to an StackOverflowException, because the algorithm cannot find the right composite component and by default it takes the closest one.

      In MyFaces it is possible to pass the values as parameters of ui:include, but the point is it is better if we allow these example to work.

      Please note this is not a bug. This looks like an improvement. The challenge here is expressions using #

      {cc}

      outside a composite component xhtml are not cacheable, so we need to study if this improvement can be done or not.

      Attachments

        1. TagAttributeImpl.java.patch
          5 kB
          Leonardo Uribe

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: