blob: 244f0e48469ab0808a66c202030c302caf1b51aa [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://java.sun.com/jsf/facelets">
<p>Buttons can be grouped with the <code class="language-markup">&lt;tc:buttons/></code> tag.
Just add some <code class="language-markup">&lt;tc:button/></code> tags.</p>
<p>Tag Library Documentation:
<tc:link label="&lt;tc:buttons/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{apiController.base}/doc/#{apiController.currentRelease}/tld/tc/buttons.html"/>
|
<tc:link label="&lt;tc:button/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{apiController.base}/doc/#{apiController.currentRelease}/tld/tc/button.html"/></p>
<tc:section label="Basics">
<p>A simple example with three buttons.</p>
<pre><code class="language-markup">&lt;tc:buttons>
&lt;tc:button label="Left"/>
&lt;tc:button label="Center"/>
&lt;tc:button label="Right"/>
&lt;/tc:buttons></code></pre>
<tc:buttons>
<tc:button label="Left"/>
<tc:button label="Center"/>
<tc:button label="Right"/>
</tc:buttons>
</tc:section>
<tc:section label="Default Button">
<p>It is also possible to set a default button.</p>
<pre><code class="language-markup">&lt;tc:buttons>
&lt;tc:button label="Left" defaultCommand="true"/>
&lt;tc:button label="Center"/>
&lt;tc:button label="Default"/>
&lt;/tc:buttons></code></pre>
<tc:buttons>
<tc:button label="Left" defaultCommand="true"/>
<tc:button label="Center"/>
<tc:button label="Default"/>
</tc:buttons>
</tc:section>
<tc:section label="Dropdown Button">
<p>A dropdown button can also be placed in a <code class="language-markup">&lt;tc:buttons/></code> tag.</p>
<pre><code class="language-markup">&lt;tc:buttons>
&lt;tc:button label="Dropdown" omit="true">
&lt;tc:link label="Action 1"/>
...
&lt;/tc:button>
&lt;tc:button label="Center"/>
&lt;tc:button label="Right"/>
&lt;/tc:buttons></code></pre>
<tc:buttons>
<tc:button id="buttonWithLinks" label="Dropdown" omit="true">
<tc:link label="Action 1"/>
<tc:link label="Action 2"/>
<tc:link label="Action 3">
<tc:link label="Action 3.1"/>
<tc:link label="Action 3.2"/>
</tc:link>
</tc:button>
<tc:button label="Center"/>
<tc:button label="Right"/>
</tc:buttons>
</tc:section>
<tc:section label="Vertical">
<p>Vertical link group.</p>
<pre><code class="language-markup">&lt;tc:buttons orientation="vertical">
&lt;tc:button label="Left"/>
&lt;tc:button label="Center"/>
&lt;tc:button label="Right"/>
&lt;/tc:buttons></code></pre>
<tc:buttons orientation="vertical">
<tc:button label="Left"/>
<tc:button label="Center"/>
<tc:button label="Right"/>
</tc:buttons>
</tc:section>
</ui:composition>