Permalink
Fetching contributors…
Cannot retrieve contributors at this time
99 lines (90 sloc) 5.15 KB
<!--
- Copyright 2012 OmniFaces.
-
- 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.
-->
<!--
The following metadata attributes are supported via this template (they're parsed in Page#loadIfNecessary()):
* api.path: String of "http://omnifaces.org/docs/javadoc/<version>/org/omnifaces/"-relative path to API documentation.
Any @see will be auto-included in Java source code.
* vdl.paths: Commaseparated string of "http://omnifaces.org/docs/vdldoc/<version>/"-relative paths to VDL documentation.
* src.paths: Commaseparated string of paths to source code snippets, if it does not start with "/", then it will be
assumed relative to webcontent "/WEB-INF/" folder, else it will be assumed relative to webcontent root.
-->
<ui:composition template="/WEB-INF/templates/layout.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:fn="http://xmlns.jcp.org/jsp/jstl/functions"
xmlns:p="http://primefaces.org/ui"
xmlns:o="http://omnifaces.org/ui"
xmlns:of="http://omnifaces.org/functions"
xmlns:os="http://omnifaces.org/showcase"
>
<ui:define name="title">#{page.title} - OmniFaces Showcase</ui:define>
<ui:define name="contentTitle">
<!--
The below p:selectOneMenu components are disabled in other phases than render response, because they
otherwise complain that the model value cannot be set even though there's no form.
See also http://stackoverflow.com/q/14068891/157882
-->
<p:selectOneMenu id="groups" value="#{page.parent.children[0].viewId}" onchange="window.location='#{request.contextPath}' + this.value"
styleClass="groups" panelStyleClass="groups" effect="fade"
disabled="#{facesContext.postback and not facesContext.renderResponse}">
<f:selectItems value="#{page.parent.parent.children}" var="_parent" itemValue="#{_parent.children[0].viewId}" itemLabel="#{_parent.title}"
itemDisabled="#{_parent.children[0] eq page.parent.children[0]}" />
</p:selectOneMenu><span class="separator">&#xa0;-&#xa0;</span>
<p:selectOneMenu id="pages" value="#{page.viewId}" onchange="window.location='#{request.contextPath}' + this.value"
styleClass="pages" panelStyleClass="pages" effect="fade"
disabled="#{facesContext.postback and not facesContext.renderResponse}" rendered="#{page.parent.childCount gt 1}">
<f:selectItems value="#{page.parent.children}" var="_page" itemValue="#{_page.viewId}" itemLabel="#{_page.title}"
itemDisabled="#{_page eq page}" />
</p:selectOneMenu>
<h:outputText value="#{page.title}" styleClass="code" rendered="#{page.parent.childCount eq 1}" />
</ui:define>
<ui:define name="content">
<p>
<div id="quickNavigation">
<p:button id="prev" icon="ui-icon-triangle-1-w" accesskey="[" title="Previous ( Alt+[ )" outcome="#{of:coalesce(page.previousSibling.viewId, '/index')}" />
<p:button id="next" icon="ui-icon-triangle-1-e" accesskey="]" title="Next ( Alt+] )" outcome="#{of:coalesce(page.nextSibling.viewId, '/index')}" />
</div>
<small>Available since OmniFaces #{page.since}</small>
</p>
<h:outputStylesheet library="showcase" name="css/showcase.css" />
<h:outputStylesheet library="showcase" name="css/prettify.css" />
<o:deferredScript library="showcase" name="js/prettify.js" />
<o:deferredScript library="showcase" name="js/onload.js" />
<ui:insert name="description">
<h:outputText value="#{page.description}" escape="false" /><!-- Copies content from 1st API documentation. -->
</ui:insert>
<ui:insert name="description-extra" />
<ui:fragment rendered="#{not empty page.sources}">
<p:panel id="demo" header="Demo">
<ui:insert name="demo" />
<o:highlight />
</p:panel>
<p:panel id="source" header="Demo source code">
<p:tabView id="sources" value="#{page.sources}" var="source">
<p:tab id="tab" title="#{source.title}">
<pre class="prettyprint"><code class="lang-#{source.type}">#{source.code}</code></pre>
</p:tab>
</p:tabView>
</p:panel>
</ui:fragment>
<p:panel id="documentation" header="Documentation &amp; Sources" rendered="#{not empty page.documentation}">
<os:listdocs header="VDL documentation" paths="vdl" url="#{_vdlURL}#{path}.html" label="#{fn:replace(path,'/', ':')}" />
<os:listdocs header="API documentation" paths="api" url="#{_apiURL}#{path}.html" label="#{fn:replace(path,'/', '.')}" />
<os:listdocs header="Java source code" paths="src" url="#{_srcURL}#{path}.java" label="#{fn:replace(path,'/', '.')}" />
<os:listdocs header="JavaScript source code" paths="js" url="#{_jsURL}#{path}" label="#{path}" />
</p:panel>
</ui:define>
</ui:composition>