JSF resolve EL expression passed like param (Facelets)
===

First, my code:

**report-layout.xhtml:**

    <ui:define name="content">
        <h:panelGroup id="reporte-viewer" layout="block" >
            <p:media value="#{reportBean.file}" player="pdf" width="500px" height="400px">
                NO SUPP!!!
            </p:media>
        </h:panelGroup>
    </ui:define>

**index.xhtml:**

    <ui:composition  xmlns="http://www.w3.org/1999/xhtml"
                 ..............
                 template="/WEB-INF/template/layouts/report-layout.xhtml">

        <ui:param name="reportBean" value="#{myBean}" />

    </ui:composition>

I tested MyBean with ViewScoped and SessionScoped, the next code is returning null when I use getValue:

**PrimeResourceHandler.java:**

    String dynamicContentEL = (String) session.get(dynamicContentId); //read: "#{reportBean.file}" replacing with "#{myBean.file}" works.
    ELContext eLContext = context.getELContext(); //OK
    ValueExpression ve = context.getApplication().getExpressionFactory().createValueExpression(eLContext, dynamicContentEL, StreamedContent.class); //Apparently OK
    streamedContent = (StreamedContent) ve.getValue(eLContext); //return null

Why when I pass MyBean like param getValue return null, JSF resolve "#{reportBean.file}" without problem, but the before code doesn't work.