2

I have MAIN jsf page where I include header/footer and center page (dynamically):

<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions" 
      xmlns:ui="http://java.sun.com/jsf/facelets">

<h:form id="formC" enctype="multipart/form-data" update=":formC"> 
     <ui:insert name="content" >
        <ui:include src="/page/Bean.page"/>
     </ui:insert>
</h:form>
...

After it opens, I can't export csv/xls from datatable.

IF I OPEN page separately (without MAIN page jsf, for example if I put datatable on my login page)...export is DONE!

In my login, I have

...
<h:form>
<p:panel> 
            <h:commandLink immediate="true">
                <p:graphicImage name="../excel.png"/>
                <p:dataExporter type="xls" target="tbl" fileName="doc" pageOnly="true"/>
            </h:commandLink>
</p:panel>


    <p:dataTable id="tbl" var="car" value="#{Bean.countries}"
...

On my MAIN page include tag, it just REFRESH my page. NO error! What's wrong?

Using primefaces 3.5, poi - 3.8-20120326.

I have a doubt about inital tags of pages. My login page, where export is OK, starts with

 <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core">

MAIN page starts with

<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions" 
      xmlns:ui="http://java.sun.com/jsf/facelets">
czda
  • 21
  • 3

0 Answers0