blob: 952a5e01826b1cdf924261f6c4aa1bf7209d386a [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">
<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.tldBase}/#{apiController.currentRelease}/tld/tc/buttons.html"/>
|
<tc:link label="&lt;tc:button/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/button.html"/></p>
<tc:section label="Basics">
<p>A simple example with three buttons.</p>
<demo-highlight language="markup">&lt;tc:buttons>
&lt;tc:button label="Left"/>
&lt;tc:button label="Center"/>
&lt;tc:button label="Right"/>
&lt;/tc:buttons></demo-highlight>
<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>
<demo-highlight 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></demo-highlight>
<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>
<demo-highlight language="markup">&lt;tc:buttons>
&lt;tc:button label="Dropdown" omit="true">
&lt;tc:link label="Action 1"/>
...
&lt;tc:separator/>
&lt;tc:link label="Other Action"/>
&lt;/tc:button>
&lt;tc:button label="Center"/>
&lt;tc:button label="Right"/>
&lt;/tc:buttons></demo-highlight>
<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:separator/>
<tc:link label="Other Action"/>
</tc:button>
<tc:button label="Center"/>
<tc:button label="Right"/>
</tc:buttons>
</tc:section>
<tc:section label="Vertical">
<p>Vertical link group.</p>
<demo-highlight 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></demo-highlight>
<tc:buttons orientation="vertical">
<tc:button label="Left"/>
<tc:button label="Center"/>
<tc:button label="Right"/>
</tc:buttons>
</tc:section>
<tc:section label="Disable">
<p>This example shows how to disable all buttons in a button group.
It's also possible to set disable to false e.g. for one button.</p>
<demo-highlight language="markup">&lt;tc:buttons disabled="true">
&lt;c:button label="Left" disabled="false"/>
&lt;tc:button label="Center"/>
&lt;tc:button label="Right"/>
&lt;/tc:buttons></demo-highlight>
<tc:buttons disabled="true">
<tc:button label="Left" disabled="false"/>
<tc:button label="Center"/>
<tc:button label="Right"/>
</tc:buttons>
</tc:section>
</ui:composition>