jsf - Primefaces DataExporter 只是刷新页面
问题描述
我有 MAIN jsf 页面,其中包含页眉/页脚和中心页面(动态):
<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>
...
打开后,我无法从数据表中导出 csv/xls。
如果我单独打开页面(没有主页面 jsf,例如,如果我将数据表放在我的登录页面上)...导出完成!
在我的登录中,我有
...
<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}"
...
在我的主页上包含标签,它只是刷新我的页面。没有错误!怎么了?
使用 primefaces 3.5,poi - 3.8-20120326。
我对页面的初始标签有疑问。我的登录页面,导出是可以的,开始于
<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">
主页以
<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">
解决方案
推荐阅读
- java - Spring boot swagger:关于 Api 的自定义信息不起作用
- node.js - 我正在尝试使用 Expess.js 提交表单,但出现错误
- php - MySQL ON DUPLICATE KEY UPDATE 正在添加新记录而不是更新现有记录
- c# - 表单之间的连续数据传递
- sql - SQL 列出表一中的用户并在值为 NULL 的另一表中计数/比较
- solr - 奇怪的 Solr 弹簧行为
- neo4j - 通过java驱动程序在neo4j中创建节点花费时间
- memory-management - Boost Interprocess named_mutex 信号量文件权限
- c# - MSSqlServer 错误:事务完成
- python - 如何在谷歌浏览器上自动打开新标签?硒蟒