我正在使用 PF mobile 对我们的网站进行移动转换。我正在尝试使用 Primefaces mobile 在对话框中打开视图。它在桌面浏览器中运行良好,但在移动版本中运行良好。页面一直等待加载,但没有任何反应。它没有在 PF mobile 中实现还是我的代码有问题?
以下是视图 - webapp/m/dlg/sampledlg.xhtml
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"xmlns:h="http://java.sun.com/jsf/html"xmlns:f="http://java.sun.com/jsf/core"xmlns:p="http://primefaces.org/ui"xmlns:pm="http://primefaces.org/mobile"><f:view renderKitId="PRIMEFACES_MOBILE" /><h:head></h:head><h:body><pm:page id="main"><pm:header title="Main Page">/pm:header><pm:content><p:link outcome="pm:second" value="Go" /></pm:content></pm:page><pm:page id="second" lazy="true"><pm:header title="Second Page"></pm:header><pm:content>Sample content</pm:content></pm:page></h:body></html>
以下是支持 bean 的代码。
RequestContext.getCurrentInstance().openDialog("dlg/sampledlg");
return;
此外,类似以下仅显示消息的基本对话框在移动页面中也不起作用。它可以在桌面上运行。
RequestContext.getCurrentInstance().showMessageInDialog("This is sample text");
face-config.xml 有以下内容:
<navigation-handler>
org.primefaces.application.DialogNavigationHandler
</navigation-handler>
<view-handler>org.primefaces.application.DialogViewHandler</view-handler>
<navigation-handler>org.primefaces.mobile.application.MobileNavigationHandler</navigation-handler>
如果需要,我绝对可以添加更多信息。非常感谢这里的任何帮助。先感谢您。
这是我的平台信息: - Tomee 7.0.0 M3 - Primefaces 6.0 - Jsf 2.2.12 - Jdk 1.7 - Jee 7