| <?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:ui="http://java.sun.com/jsf/facelets" |
| xmlns:tc="http://myfaces.apache.org/tobago/component" |
| xmlns:demo="http://myfaces.apache.org/tobago/example/demo"> |
| |
| <ui:param name="title" value="SplitLayout Example"/> |
| |
| <p><span class="#{demo:bootstrapClass('BADGE')} #{demo:bootstrapClass('BADGE_DANGER')}">Warning!</span> |
| Preliminary implementation, work in progress!</p> |
| |
| <p> |
| The SplitLayout implements a two component layout with a divider between |
| the components to adjust the space between the components. |
| </p> |
| <p> |
| Drag the divder between the boxes to see the effect</p> |
| |
| <tc:section> |
| <pre><code class="language-markup"><tc:splitLayout columns="2fr 1fr 1fr"> |
| <tc:panel> |
| <tc:style minWidth="150px"/> |
| <p>...</p> |
| </tc:panel> |
| <tc:textarea value="Text 1" labelLayout="none"> |
| <tc:style minWidth="150px"/> |
| </tc:textarea> |
| <tc:textarea value="Text 2" labelLayout="none"> |
| <tc:style minWidth="150px"/> |
| </tc:textarea> |
| </tc:splitLayout></code></pre> |
| <tc:splitLayout columns="2fr 1fr 1fr"> |
| <tc:panel> |
| <tc:style minWidth="150px"/> |
| <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore |
| et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. |
| Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, |
| consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, |
| sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea |
| takimata sanctus est Lorem ipsum dolor sit amet.</p> |
| </tc:panel> |
| <tc:textarea value="Text 1" labelLayout="none"> |
| <tc:style minWidth="150px"/> |
| </tc:textarea> |
| <tc:textarea value="Text 2" labelLayout="none"> |
| <tc:style minWidth="150px"/> |
| </tc:textarea> |
| </tc:splitLayout> |
| </tc:section> |
| |
| <tc:section> |
| <pre><code class="language-markup"><tc:splitLayout columns="1fr 4fr 1fr"> |
| <tc:button label="A"/> |
| <tc:button label="B"/> |
| </tc:splitLayout></code></pre> |
| <tc:splitLayout columns="1fr 4fr 1fr"> |
| <tc:button label="A"/> |
| <tc:button label="B"/> |
| <!--<tc:button label="C"/>--> |
| </tc:splitLayout> |
| </tc:section> |
| |
| <tc:section> |
| <pre><code class="language-markup"><tc:splitLayout columns="\#{splitLayoutController.verticalLayout}"> |
| <tc:splitLayout rows="\#{splitLayoutController.horizontalLayout}"> |
| <tc:box label="Top left box"> |
| <tc:style minWidth="150px"/> |
| <tc:out |
| value="Current vertical layout first value: \#{splitLayoutController.verticalLayoutFirstToken}"/> |
| <tc:out |
| value="Current horizontal layout first value: \#{splitLayoutController.horizontalLayoutFirstToken}"/> |
| </tc:box> |
| <tc:box label="Top right box"> |
| <tc:style minWidth="150px"/> |
| <tc:out |
| value="Current vertical layout first value: \#{splitLayoutController.verticalLayoutFirstToken}"/> |
| <tc:out |
| value="Current horizontal layout second value: \#{splitLayoutController.horizontalLayoutSecondToken}"/> |
| </tc:box> |
| </tc:splitLayout> |
| <tc:box label="Bottom box"> |
| <tc:style minWidth="150px"/> |
| <tc:out |
| value="Current vertical layout second value: \#{splitLayoutController.verticalLayoutSecondToken}"/> |
| </tc:box> |
| </tc:splitLayout></code></pre> |
| <tc:flexLayout rows="auto 1fr"> |
| <tc:splitLayout columns="#{splitLayoutController.verticalLayout}"> |
| <tc:splitLayout rows="#{splitLayoutController.horizontalLayout}"> |
| <tc:box label="Top left box"> |
| <tc:style minWidth="150px"/> |
| <tc:out |
| value="Current vertical layout first value: #{splitLayoutController.verticalLayoutFirstToken}"/> |
| <tc:out |
| value="Current horizontal layout first value: #{splitLayoutController.horizontalLayoutFirstToken}"/> |
| </tc:box> |
| <tc:box label="Top right box"> |
| <tc:style minWidth="150px"/> |
| <tc:out |
| value="Current vertical layout first value: #{splitLayoutController.verticalLayoutFirstToken}"/> |
| <tc:out |
| value="Current horizontal layout second value: #{splitLayoutController.horizontalLayoutSecondToken}"/> |
| </tc:box> |
| </tc:splitLayout> |
| <tc:box label="Bottom box"> |
| <tc:style minWidth="150px"/> |
| <tc:out |
| value="Current vertical layout second value: #{splitLayoutController.verticalLayoutSecondToken}"/> |
| </tc:box> |
| </tc:splitLayout> |
| </tc:flexLayout> |
| </tc:section> |
| </ui:composition> |