Primefaces Dialog Framework打开相同的portlet页面而不是必需的页面.
<p:commandButton value="Dialog" process="@this" icon="ui-icon-extlink" actionListener="#{controller.viewDialog}" />
Run Code Online (Sandbox Code Playgroud)
豆:
public void viewDialog() {
Map<String,Object> options = new HashMap<String, Object>();
options.put("modal", true);
options.put("draggable", false);
options.put("resizable", true);
options.put("contentHeight", 320);
RequestContext.getCurrentInstance().openDialog("viewDialog", options, null);
Run Code Online (Sandbox Code Playgroud)
viewDialog.xhtml:
<f:view xmlns="http://www.w3.org/1999/xhtml"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:portlet="http://java.sun.com/portlet_2_0">
<h:head />
<h:body styleClass="jsf2-portlet">
<f:event type="preRenderView" listener="#{dialog.initController}" />
</h:body>
Run Code Online (Sandbox Code Playgroud)
我的模板中有一个带有图像的组件
<div class="logo"><img src="../images/logo.png"/></div>
Run Code Online (Sandbox Code Playgroud)
运行业力任务时会引发此类错误
Uncaught Error: Cannot find module "../images/logo.png"
Run Code Online (Sandbox Code Playgroud)
提及该应用程序可以很好地渲染图像,只有业力在抱怨。
任何建议将被认真考虑。