| <?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"><tc:buttons/></code> tag. |
| Just add some <code class="language-markup"><tc:button/></code> tags.</p> |
| <p>Tag Library Documentation: |
| <tc:link label="<tc:buttons/>" image="#{request.contextPath}/image/feather-leaf.png" link="#{apiController.tldBase}/#{apiController.currentRelease}/tld/tc/buttons.html"/> |
| | |
| <tc:link label="<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"><tc:buttons> |
| <tc:button label="Left"/> |
| <tc:button label="Center"/> |
| <tc:button label="Right"/> |
| </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"><tc:buttons> |
| <tc:button label="Left" defaultCommand="true"/> |
| <tc:button label="Center"/> |
| <tc:button label="Default"/> |
| </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"><tc:buttons/></code> tag.</p> |
| <demo-highlight language="markup"><tc:buttons> |
| <tc:button label="Dropdown" omit="true"> |
| <tc:link label="Action 1"/> |
| ... |
| <tc:separator/> |
| <tc:link label="Other Action"/> |
| </tc:button> |
| <tc:button label="Center"/> |
| <tc:button label="Right"/> |
| </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"><tc:buttons orientation="vertical"> |
| <tc:button label="Left"/> |
| <tc:button label="Center"/> |
| <tc:button label="Right"/> |
| </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"><tc:buttons disabled="true"> |
| <c:button label="Left" disabled="false"/> |
| <tc:button label="Center"/> |
| <tc:button label="Right"/> |
| </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> |