| <?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>Tobago provides several ways to select an option. |
| Entries are added with <code class="language-markup"><tc:selectItem/></code> or |
| <code class="language-markup"><tc:selectItems value="\#{controller.list}"/></code> |
| for most select components.</p> |
| |
| <tc:section label="Checkbox"> |
| <demo-highlight language="markup"><tc:selectBooleanCheckbox label="Checkbox"/></demo-highlight> |
| <tc:selectBooleanCheckbox label="Checkbox" itemLabel="OK?"/> |
| </tc:section> |
| |
| <tc:section label="Toggle"> |
| <demo-highlight language="markup"><tc:selectBooleanToggle label="Toggle"/></demo-highlight> |
| <tc:selectBooleanToggle label="Toggle" itemLabel="Active"/> |
| </tc:section> |
| |
| <tc:section label="Dropdown"> |
| <demo-highlight language="markup"><tc:selectOneChoice label="Dropdown Box"></demo-highlight> |
| <tc:selectOneChoice label="Dropdown Box"> |
| <tc:selectItems value="#{selectController.entries}"/> |
| </tc:selectOneChoice> |
| </tc:section> |
| |
| <tc:section label="Radio Button"> |
| <demo-highlight language="markup"><tc:selectOneRadio label="Radio Group" labelLayout="top"></demo-highlight> |
| <tc:selectOneRadio id="radio" label="Radio Group" labelLayout="top"> |
| <tc:selectItem itemLabel="Option One"/> |
| <tc:selectItem itemLabel="Option Two"/> |
| </tc:selectOneRadio> |
| </tc:section> |
| |
| <tc:section label="Listbox"> |
| <demo-highlight language="markup"><tc:selectOneListbox label="Listbox" size="3"></demo-highlight> |
| <tc:selectOneListbox label="Listbox" size="3"> |
| <tc:selectItems value="#{selectController.entries}"/> |
| </tc:selectOneListbox> |
| </tc:section> |
| |
| <tc:section label="Checkbox Group"> |
| <demo-highlight language="markup"><tc:selectManyCheckbox label="Checkbox Group" labelLayout="top"></demo-highlight> |
| <tc:selectManyCheckbox label="Checkbox Group" labelLayout="top"> |
| <tc:selectItem itemLabel="Checkbox One"/> |
| <tc:selectItem itemLabel="Checkbox Two"/> |
| </tc:selectManyCheckbox> |
| </tc:section> |
| |
| <tc:section label="Multiselection List"> |
| <demo-highlight language="markup"><tc:selectManyListbox label="List" size="3"></demo-highlight> |
| <tc:selectManyListbox label="List" size="3"> |
| <tc:selectItems value="#{selectController.entries}"/> |
| </tc:selectManyListbox> |
| </tc:section> |
| |
| <tc:section label="Shuttle"> |
| <demo-highlight language="markup"><tc:selectManyShuttle label="Shuttle List" size="7"></demo-highlight> |
| <tc:selectManyShuttle label="Shuttle List" size="7"> |
| <tc:selectItems value="#{selectController.entries}"/> |
| </tc:selectManyShuttle> |
| </tc:section> |
| </ui:composition> |