<tc:toolBar/> and <tc:toolBarCommand/> are deprecated. To replace a toolbar in the header of a component use Button Group or Link Group instead. To replace a plain toolbar, use Bar.
<tc:toolBar/>
<tc:toolBarCommand/>
The first box show the deprecated version of a toolbar. The second and the third one are solutions with Button Group and Link Group.
Instead of <f:facet name="toolBar"/> use <f:facet name="bar"/>.
<f:facet name="toolBar"/>
<f:facet name="bar"/>
Instead of <tc:toolBar/> use <tc:buttons/> or <tc:links/>.
<tc:buttons/>
<tc:links/>
Instead of <tc:toolBarCommand/> use <tc:button/> or <tc:link/>.
<tc:button/>
<tc:link/>
Content
For a plain toolbar use the <tc:bar/> tag.
<tc:bar/>
<tc:toolBar> <tc:toolBarCommand label="Text Button"/> <tc:toolBarCommand label="Image Button" image="fa-cube"/> <tc:in placeholder="Search"/> </tc:toolBar>
<tc:bar> <tc:buttons> <tc:button label="Text Button"/> <tc:button label="Image Button" image="fa-cube"/> </tc:buttons> <tc:flowLayout textAlign="right"> <tc:button label="Dropdown" omit="true"> ... </tc:button> <tc:in placeholder="Search"/> </tc:flowLayout> </tc:bar>
<?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:tc="http://myfaces.apache.org/tobago/component" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"> <ui:param name="title" value="#{demoBundle.toolBar} <tc:toolBar>"/> <p><code class="language-markup"><tc:toolBar/></code> and <code class="language-markup"><tc:toolBarCommand/></code> are deprecated. To replace a toolbar in the header of a component use <tc:link label="#{demoBundle.buttons}" outcome="/content/20-component/040-command/20-buttons/buttons.xhtml"/> or <tc:link label="#{demoBundle.links}" outcome="/content/20-component/040-command/25-links/links.xhtml"/> instead. To replace a plain toolbar, use <tc:link label="#{demoBundle.bar}" outcome="/content/20-component/050-container/60-bar/bar.xhtml"/>.</p> <tc:section label="Content Box Header"> <p>The first box show the deprecated version of a toolbar. The second and the third one are solutions with #{demoBundle.buttons} and #{demoBundle.links}.</p> <p>Instead of <code class="language-markup"><f:facet name="toolBar"/></code> use <code class="language-markup"><f:facet name="bar"/></code>.</p> <p>Instead of <code class="language-markup"><tc:toolBar/></code> use <code class="language-markup"><tc:buttons/></code> or <code class="language-markup"><tc:links/></code>.</p> <p>Instead of <code class="language-markup"><tc:toolBarCommand/></code> use <code class="language-markup"><tc:button/></code> or <code class="language-markup"><tc:link/></code>.</p> <tc:box label="#{demoBundle.buttons}"> <f:facet name="bar"> <tc:buttons> <tc:button label="Text Button"/> <tc:button label="Image Button" image="fa-cube"/> <tc:button label="Dropdown" omit="true"> <tc:link label="Action 1"/> <tc:link label="Action 2"/> <tc:link label="Action 3"/> </tc:button> </tc:buttons> </f:facet> <p>Content</p> </tc:box> <tc:box label="#{demoBundle.links}"> <f:facet name="bar"> <tc:links> <tc:link label="Text Link"/> <tc:link label="Image Link" image="fa-cube"/> <tc:link label="Dropdown" omit="true"> <tc:link label="Action 1"/> <tc:link label="Action 2"/> <tc:link label="Action 3"/> </tc:link> </tc:links> </f:facet> <p>Content</p> </tc:box> </tc:section> <tc:section label="Plain toolbar"> <p>For a plain toolbar use the <code class="language-markup"><tc:bar/></code> tag.</p> <tc:section label="Deprecated"> <pre><code class="language-markup"><tc:toolBar> <tc:toolBarCommand label="Text Button"/> <tc:toolBarCommand label="Image Button" image="fa-cube"/> <tc:in placeholder="Search"/> </tc:toolBar></code></pre> </tc:section> <tc:section label="#{demoBundle.bar}"> <pre><code class="language-markup"><tc:bar> <tc:buttons> <tc:button label="Text Button"/> <tc:button label="Image Button" image="fa-cube"/> </tc:buttons> <tc:flowLayout textAlign="right"> <tc:button label="Dropdown" omit="true"> ... </tc:button> <tc:in placeholder="Search"/> </tc:flowLayout> </tc:bar></code></pre> <tc:bar> <tc:buttons> <tc:button label="Text Button"/> <tc:button label="Image Button" image="fa-cube"/> </tc:buttons> <tc:flowLayout textAlign="right"> <tc:button label="Dropdown" omit="true"> <tc:link label="Action 1"/> <tc:link label="Action 2"/> <tc:link label="Action 3"/> </tc:button> <tc:in placeholder="Search"/> </tc:flowLayout> </tc:bar> </tc:section> </tc:section> </ui:composition>