2
我想創建一個移動網頁(基於PrimeFaces移動),它看起來像這樣:如何在PrimeFaces Mobile頁面中佈置按鈕?
的圖像和它的下面 - 兩個按鈕。
我寫了這以下的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>
<f:event listener="#{main.loadFirstImage}" type="preRenderView" />
<h:body id="body">
<pm:page id="page">
<pm:header title="myapp">
</pm:header>
<pm:content id="content">
<h:form>
<p:panelGrid columns="2">
<p:row>
<p:column colspan="2">
<p:graphicImage id="image" rendered="false" value="#{main.currentImage()}"
cache="false">
</p:graphicImage>
</p:column>
</p:row>
<p:row>
<p:column colspan="1">
<p:commandButton id="hotButton"
value="Button 1"/>
</p:column>
<p:column colspan="1">
<p:commandButton id="notButton"
value="Button 2"/>
</p:column>
</p:row>
</p:panelGrid>
</h:form>
</pm:content>
<pm:footer title="m.myapp.info"></pm:footer>
</pm:page>
</h:body>
</html>
而是我得到這樣的觀點:
我怎樣才能改變我的XHTML文件以獲得所需的佈局?