blob: 0f8b31a76c655d08ea8a5dca6c2879f1dd2e1434 [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<!--
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.
-->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:tr="http://myfaces.apache.org/trinidad">
<jsp:directive.page contentType="text/html;charset=utf-8"/>
<f:view>
<tr:document title="Partial Page Rendering Demos, previous release syntax (backward-compatible)">
<tr:form>
<tr:panelPage>
<f:facet name="navigationGlobal">
<tr:navigationPane hint="buttons">
<tr:commandNavigationItem text="Return to Feature Demos page"
immediate="true" action="demos"/>
<tr:commandNavigationItem text="Return to PPR Demo page"
immediate="true" action="demos.ppr"/>
</tr:navigationPane>
</f:facet>
<tr:outputText styleClass="AFInstructionText"
value="This tests the DEPRECATED syntax for partialTriggers. It's meant as a test for backward compatibility.
You will see warnings in the console for using deprecated syntax."/>
<tr:goLink destination="testRelativePartialTriggers.jspx" text="Go to SUPPORTED syntax test page"/>
<tr:separator/>
<f:subview id="nc1">
<tr:commandButton text="commandButton 1" partialSubmit="true"
id="commandButton1"
action="#{testTriggers.commandButton1_action}"/>
<tr:commandButton text="commandButton 2"
binding="#{testTriggers.commandButton2}"
id="commandButton2"
partialTriggers="commandButton1"/>
<f:subview id="nc2">
<tr:panelGroupLayout>
<tr:inputText label="Label 1"
binding="#{testTriggers.inputText1}"
id="inputText1"
partialTriggers=":::commandButton1 :::nc4:table1:commandButton3"/>
</tr:panelGroupLayout>
</f:subview>
<f:subview id="nc3">
<tr:inputText label="Label 2" binding="#{testTriggers.inputText2}"
id="inputText2"
partialTriggers=":::commandButton1 :::nc4:table1:commandButton3"/>
</f:subview>
<f:subview id="nc4">
<tr:table value="#{testTriggers.tableData}" id="table1" var="row"
partialTriggers="::commandButton1 table1:commandButton3 commandButton4"
binding="#{testTriggers.table1}">
<tr:column headerText="Column">
<tr:panelGroupLayout>
<tr:inputText value="#{row.name}" id="inputText3"
binding="#{testTriggers.inputText3}"
partialTriggers=":::commandButton1 commandButton3"/>
<tr:commandButton text="Refresh table"
action="#{testTriggers.commandButton3_action}"
id="commandButton3" partialSubmit="true"/>
</tr:panelGroupLayout>
</tr:column>
</tr:table>
<tr:commandButton text="Make table gold"
action="#{testTriggers.commandButton4_action}"
id="commandButton4" partialSubmit="true"/>
</f:subview>
<tr:separator/>
<f:subview id="nc5">
<tr:panelHeader text="Header">
<tr:table value="#{testTriggers.tableData}" id="table2"
var="row" partialTriggers=":::commandButton1"
binding="#{testTriggers.table2}">
<tr:column headerText="Table2Column">
<tr:inputText value="#{row.name}" id="inputText4"/>
</tr:column>
</tr:table>
</tr:panelHeader>
</f:subview>
<!-- type in inputText, outputText should turn red, commandButton's color turns red -->
<!-- click on the button, the outputText should turn pink -->
<!-- select a row in the table, and the outputText should turn aqua -->
<tr:panelGroupLayout layout="vertical">
<tr:outputText styleClass="AFInstructionText"
value="type in inputText, outputText should turn red, commandButton's color turns red"/>
<tr:outputText styleClass="AFInstructionText"
value="click on the button, the outputText should turn pink"/>
<tr:outputText styleClass="AFInstructionText"
value="select a row in the table, and the outputText should turn aqua, button color turns aqua"/>
</tr:panelGroupLayout>
<tr:commandButton id="commandButton1x" action="#{testTriggers.commandButton1x_action}" text="Make output pink"
binding="#{testTriggers.commandButton1x}"
partialTriggers="table1x:inputText1x table1x"/>
<tr:table id="table1x" value="#{testTriggers.tableData}" autoSubmit="true" rowSelection="single" selectionListener="#{testTriggers.tableRowSelected}" >
<tr:column>
<tr:inputText id="inputText1x" autoSubmit="true" valueChangeListener="#{testTriggers.input1xChanged}"/>
</tr:column>
<tr:column>
<tr:outputText id="outputText1x" partialTriggers="::inputText1x :::commandButton1x :::table1x" value="hello, outputText"
binding ="#{testTriggers.outputText1x}"/>
</tr:column>
</tr:table>
</f:subview>
</tr:panelPage>
</tr:form>
</tr:document>
</f:view>
</jsp:root>