graphic image not working while using ui:include

UI Components for JSF
Post Reply
rubi
Posts: 160
Joined: 24 May 2010, 16:53

13 Sep 2011, 11:20

Here is the code I am using...


phototest.java //bean
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
private StreamedContent photo;
public PhotoTest()
{
FacesContext context = FacesContext.getCurrentInstance();
photo= new DefaultStreamedContent(context.getExternalContext().getResourceAsStream("/resources/workspace/Wat.jpg"), "image/jpeg");
}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
index.xhtml..
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<ui:include src="test.xhtml">
<ui:param name="bean" value="#{photoTest}"/>
</ui:include>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test.xhtml
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<ui:composition>
#{bean.photo}
<p:graphicImage value="#{bean.photo}" />
</ui:composition>
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

in above code p:graphic image not loading the streamedcontent .
it is working properly by with out using the ui:include,ui :param;


could someone point me to a solution......
Glassfish V3.1.1,Mojarra 2.1.2, PrimeFaces-3.0RC1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 28 guests