Permalink
Fetching contributors…
Cannot retrieve contributors at this time
72 lines (67 sloc) 3.09 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright 2014, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<ui:composition template="/WEB-INF/templates/mobile.xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j">
<ui:define name="content">
<h:outputStylesheet name="app.css" library="css"/>
<h:outputStylesheet name="mobile.css" library="css"/>
<div id="browser">
<header>
<div>
<div id="back-button" class="hide-button">Home</div>
<div id="info-button" class="right-header-button info-link">
<a href="#about">i</a>
</div>
<p>Richfaces Mobile</p>
</div>
</header>
<h:form id="mobileForm">
<h:outputScript target="head">
var handleHashChange = function (page) {
var appPage = $('#app-page');
if (appPage.data('activePage') === page) {
slidfast.core.slideTo('app-page');
} else {
loadPage(page);
appPage.data('activePage', page);
}
}
</h:outputScript>
<a4j:jsFunction name="loadPage"
data="#{pageBean.location}"
render="@form"
oncomplete="slidfast.core.slideTo('app-page')">
<a4j:param name="page" assignTo="#{pageBean.location}"/>
</a4j:jsFunction>
<div id="page-container">
<div id="home-page" class="page stage-left">
<ui:include src="/mobile/home.xhtml"/>
</div>
<div id="app-page" class="page stage-right">
<ui:include src="#{pageBean.page}"/>
</div>
</div>
</h:form>
</div>
<a4j:push id="push" address="pushCdi" ondataavailable="showMessage(event.rf.data)">
<a4j:ajax event="dataavailable" render="mobileForm:membersPanel"/>
</a4j:push>
</ui:define>
</ui:composition>