myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Andraschko <andraschko.tho...@gmail.com>
Subject Re: Unwrap CC ValueExpression?
Date Mon, 13 May 2013 12:08:51 GMT
Hi Kito,

CC:
----------------------------------------------------------------------------------------------------------------
    <composite:interface>
        <composite:attribute name="pdfStream"
type="org.primefaces.model.StreamedContent" required="true" />
    </composite:interface>

    <composite:implementation>
        <p:media value="#{cc.attrs.pdfStream}" width="100%" height="600px"
player="pdf"/>
    </composite:implementation>
----------------------------------------------------------------------------------------------------------------

View:
----------------------------------------------------------------------------------------------------------------
    <cc:myCC pdfStream="#{reportController.report} />
----------------------------------------------------------------------------------------------------------------

PF receives the Expression String via:
----------------------------------------------------------------------------------------------------------------
media.getValueExpression("value").getExpressionString();
----------------------------------------------------------------------------------------------------------------

If it should work inside a CC, we must receive "#{cc.attrs.pdfStream}"
instead of "#{cc.attrs.pdfStream}".

How can get the real expression here?

Thanks,
Thomas


2013/5/13 Kito Mann <kito.mann@virtua.com>

> Hello Thomas,
>
> I think this is doable. Can you send us your composite component code?
>
> ___
>
> Kito D. Mann | @kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> @jsfcentral
> +1 203-998-0403
>
> * JSF2 in Action Course - 6/17 - London:
> http://skillsmatter.com/course/home/jsf-and-ajax/ng-6708
> * Listen to the Enterprise Java Newscast: *
> http://blogs.jsfcentral.com/JSFNewscast/
> *
> * JSFCentral Interviews Podcast:
> http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> * Sign up for the JSFCentral Newsletter:
> http://oi.vresp.com/?fid=ac048d0e17
>
>
> On Mon, May 13, 2013 at 7:17 AM, Thomas Andraschko <
> andraschko.thomas@gmail.com> wrote:
>
> > Hi,
> >
> > is it possible unwrap a CC ValueExpresion?
> > i found a bug with PrimeFaces p:media inside a composite component and i
> > would like to fix it.
> >
> > If you pass the EL via a CC attr (e.g. #{myController.content}) and
> attach
> > it to p:media (e.g. #{cc.attrs.content}),
> > p:media gets the ValueExpression and saves them in the session, to later
> > stream the content in a resource request.
> > Later the ResourceHandler evaluates it and tries to get the value of
> > #{cc.attrs.content}, which can't work ofc.
> >
> > So is it possible to extract the "real" EL before store it in the
> session?
> > Is there a solution which also works in mojarra?
> >
> >
> > Regards,
> > Thomas
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message