The <tc:progress/> tag create a progressbar. The most important attribute is value. It could be a double - in that case, you need the attribute max as well. Or it is of type BoundedRangeModel.
<tc:progress/>
value
double
max
BoundedRangeModel
Tag Library Documentation: <tc:progress/> | BoundedRangeModel
A static progressbar, with value of type double.
<tc:progress value="15.8" max="20"/>
A static progressbar containing a <tc:style width="50%" height="2px"/> tag.
<tc:style width="50%" height="2px"/>
By pressing the button, progress is added to the progressbar.
<tc:button label="Add Progress" action="#{progressController.addProgress}"/> <tc:progress value="#{progressController.progress}"/>
In this example, the current time is displayed as progressbars.
<tc:progress value="#{progressController.currentHours}" max="23"/>
Warning! The reload feature is preliminary and may be subject of change in later versions!
<?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://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:demo="http://myfaces.apache.org/tobago/example/demo"> <ui:param name="title" value="#{demoBundle.progress} <tc:progress>"/> <p>The <code class="language-markup"><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="<tc:progress/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{demoBundle.tagDocUrl}/#{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> <pre><code class="language-markup"><tc:progress value="15.8" max="20"/></code></pre> <tc:progress value="15.8" max="20"/> </tc:section> <tc:section label="Style"> <p>A static progressbar containing a <code class="language-markup"><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> <pre><code class="language-markup"><tc:button label="Add Progress" action="\#{progressController.addProgress}"/> <tc:progress value="\#{progressController.progress}"/></code></pre> <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> <pre><code class="language-markup"><tc:progress value="\#{progressController.currentHours}" max="23"/></code></pre> <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>