Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf 2 primefaces mobile中的模板_Jsf 2_Primefaces_Mobile Website - Fatal编程技术网

Jsf 2 primefaces mobile中的模板

Jsf 2 primefaces mobile中的模板,jsf-2,primefaces,mobile-website,Jsf 2,Primefaces,Mobile Website,如何在primefaces mobile中创建模板,因为根标记是f:view,而不是html。XML根元素并不重要。它只保存XML名称空间声明。关键是主模板中应该有一个。因此,主模板的以下启动示例应该同样有效: <f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" x

如何在primefaces mobile中创建模板,因为根标记是f:view,而不是html。

XML根元素并不重要。它只保存XML名称空间声明。关键是主模板中应该有一个
。因此,主模板的以下启动示例应该同样有效:

<f:view 
    xmlns="http://www.w3.org/1999/xhtml"
    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:pm="http://primefaces.org/mobile"
    renderKitId="PRIMEFACES_MOBILE"
>
    <ui:insert name="some" />
</f:view>

模板客户端看起来与平常一样:

<ui:composition template="/WEB-INF/template.xhtml"
    xmlns="http://www.w3.org/1999/xhtml"
    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:pm="http://primefaces.org/mobile"
>
    <ui:define name="some">
        ...
    </ui:define>
</ui:composition>

...

非常感谢您的快速回答。您还可以告诉我如何显示页面间导航的加载栏(当从一个pm:视图导航到另一个pm:视图时,加载栏工作正常,但如何显示页面间导航的加载栏),或者我应该为此发布一个单独的问题吗?我们应该将pm:页面放置在哪里