blob: eb1aa6055a62e1b2db2d29463b7aeff49e58e00d [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.
-->
<f:view
xmlns:tc="http://myfaces.apache.org/tobago/component"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
<tc:page>
<tc:gridLayout columns="250px 1fr">
<tc:label value="condition"/>
<tc:gridLayout columns="1fr 1fr">
<tc:selectBooleanCheckbox value="#{attributeController.condition}"/>
<tc:button label="update" action="#{attributeController.update}"/>
</tc:gridLayout>
<tc:label value="simple output"/>
<tc:in readonly="true">
<tc:attribute name="value" value="Some Value from the tc:attribute"/>
</tc:in>
<tc:label value="output over EL"/>
<tc:in readonly="true">
<tc:attribute name="value" value="#{attributeController.counter}"/>
</tc:in>
<tc:label value="action"/>
<tc:button label="Click">
<tc:attribute name="action" value="#{attributeController.reload}"/>
</tc:button>
<tc:label value="conditional action (#{attributeController.condition})"/>
<tc:button label="Click">
<c:if test="${attributeController.condition}">
<tc:attribute name="action" value="#{attributeController.reload}"/>
</c:if>
</tc:button>
<tc:label value="conditional action not (#{not attributeController.condition})"/>
<tc:button label="Click">
<c:if test="${not attributeController.condition}">
<tc:attribute name="action" value="#{attributeController.reload}"/>
</c:if>
</tc:button>
<tc:label
value="conditional action (#{attributeController.condition}) and outcome not (#{not attributeController.condition})"/>
<tc:button label="Click">
<c:if test="${attributeController.condition}">
<tc:attribute name="action" value="#{attributeController.reload}"/>
</c:if>
<c:if test="${not attributeController.condition}">
<tc:attribute name="outcome" value="/content/10-intro/intro.xhtml"/>
</c:if>
</tc:button>
</tc:gridLayout>
</tc:page>
</f:view>