profile.xhtml:
Code: Select all
<ui:composition template="/WEB-INF/template/visitor/common.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:o="http://omnifaces.org/ui"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions"
xmlns:pm="http://primefaces.org/mobile"
>
<ui:param name="mainActiveIndex" value="3"/>
<ui:define name="content">
<h:form id="profileEdit">
<pm:field>
<p:outputLabel for="name" value="#{ui.name}"/>
<p:inplace id="nameInplace" editor="true">
<p:inputText id="name" value="#{profileEditor.name}" required="true"/>
</p:inplace>
<p:messages for="name" id="nameMessages"/>
</pm:field>
(...more fields..)
</h:form>
</ui:define>
</ui:composition>
Code: Select all
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:pm="http://primefaces.org/mobile"
>
<f:view renderKitId="PRIMEFACES_MOBILE"/>
<h:head>
<h:outputScript name="primefaces_ja.js"/>
<ui:insert name="head"/>
</h:head>
<h:body>
<pm:page>
<pm:header>
<p:tabMenu id="mainmenu" activeIndex="#{mainActiveIndex}">
(...navbar...)
</p:tabMenu>
</pm:header>
<pm:content>
<ui:insert name="content"/>
<p:growl id="growl" autoupdate="true"/>
</pm:content>
<pm:footer />
</pm:page>
</h:body>
</html>