blob: 9d002ef9c87f13acaa2e7e1961d3a83ee4f617d7 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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="/main.xhtml"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:tc="http://myfaces.apache.org/tobago/component"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:demo="http://myfaces.apache.org/tobago/example/demo">
<p>The <code class="language-markup">&lt;tc:progress/></code> tag create a progressbar.
The most important attribute is <code>value</code>.
It could be a <code>double</code> - in that case, you need the attribute <code>max</code> as well.
Or it is of type <code>BoundedRangeModel</code>.</p>
<p>Tag Library Documentation:
<tc:link label="&lt;tc:progress/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/progress.html"/>
|
<tc:link label="BoundedRangeModel"
link="https://docs.oracle.com/javase/7/docs/api/javax/swing/BoundedRangeModel.html"/></p>
<tc:section label="Basics">
<p>A static progressbar, with <code>value</code> of type <code>double</code>.</p>
<demo-highlight language="markup">&lt;tc:progress value="15.8" max="20"/></demo-highlight>
<tc:progress value="15.8" max="20"/>
</tc:section>
<tc:section label="Style">
<p>A static progressbar containing a <code class="language-markup">&lt;tc:style width="50%" height="2px"/></code>
tag.</p>
<tc:progress value="14.9" max="20">
<tc:style width="50%" height="2px"/>
</tc:progress>
</tc:section>
<tc:section label="Button">
<p>By pressing the button, progress is added to the progressbar.</p>
<demo-highlight language="markup">&lt;tc:button label="Add Progress" action="\#{progressController.addProgress}"/>
&lt;tc:progress value="\#{progressController.progress}"/></demo-highlight>
<tc:button id="b1" label="Add Progress" action="#{progressController.addProgress}"/>
<br/>
<tc:progress value="#{progressController.progress}"/>
</tc:section>
<tc:section label="Time">
<p>In this example, the current time is displayed as progressbars.</p>
<demo-highlight language="markup">&lt;tc:progress value="\#{progressController.currentHours}" max="23"/></demo-highlight>
<tc:panel id="reloadPanel">
<f:facet name="reload">
<tc:reload frequency="1000" update="true"/>
</f:facet>
<p>
<span class="#{demo:bootstrapClass('BADGE')} #{demo:bootstrapClass('BADGE_DANGER')}">Warning!</span>
<b>The reload feature is preliminary and may be subject of change in later versions!</b>
</p>
<tc:out id="o1" label="Current Date" value="#{progressController.currentDate}">
<f:convertDateTime pattern="HH:mm:ss"/>
</tc:out>
<tc:label value="Hour"/>
<tc:progress value="#{progressController.currentHours}" max="23"/>
<br/>
<tc:label value="Minutes"/>
<tc:progress value="#{progressController.currentMinutes}" max="59"/>
<br/>
<tc:label value="Seconds"/>
<tc:progress value="#{progressController.currentSeconds}" max="59"/>
</tc:panel>
</tc:section>
</ui:composition>