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

FaceletVLD.retargetMethodExpressions should preserve EL VariableMapper and FunctionMapper

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.2-SNAPSHOT
    • 2.0.2
    • JSR-252
    • None
    • myfaces current trunk

    Description

      org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.retargetMethodExpressions calls facesContext.getELContext() but should use FaceletContext instead to preserve EL variable and function mapping. Consider this example:

      <ui:param
      name="localBean"
      value="#

      {very.long.path.to.a.bean.in.el}

      " />
      <a:niceCompositeComponent customMethod="#

      {localBean.method}

      " >

      will not work but

      customMethod="#

      {very.long.path.to.a.bean.in.el.method}

      will.

      This can be easily fixed by using ELContext elContext = (ELContext) context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);

      instead of facesContext.getELContext().

      Attachments

        1. MYFACES-2875.patch
          6 kB
          Martin Kočí

        Activity

          People

            jakobkorherr Jakob Korherr
            markoc50 Martin Kočí
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: