| <?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:tr="http://myfaces.apache.org/trinidad"> |
| <jsp:directive.page contentType="text/html;charset=utf-8"/> |
| <f:view> |
| <tr:document title="Add dialog"> |
| <tr:form> |
| <tr:panelPage> |
| <tr:messages/> |
| <tr:panelHeader text="Add two numbers"> |
| <tr:panelFormLayout> |
| <tr:inputText label="Number 1:" value="#{chooseInteger.value1}" |
| required="true"> |
| <f:facet name="help"> |
| <tr:outputText value="Enter an integer."/> |
| </f:facet> |
| </tr:inputText> |
| <tr:inputText label="Number 2:" value="#{chooseInteger.value2}" |
| required="true"> |
| <f:facet name="help"> |
| <tr:outputText value="Enter an integer."/> |
| </f:facet> |
| </tr:inputText> |
| </tr:panelFormLayout> |
| </tr:panelHeader> |
| <tr:panelButtonBar> |
| <tr:commandButton text="Show Dialog" action="dialog:simpleDialog" |
| windowWidth="150" windowHeight="150" immediate="true" |
| partialSubmit="true" useWindow="true" |
| returnListener="#{chooseInteger.sayHello}"/> |
| <tr:commandButton text="Submit"> |
| <tr:returnActionListener value="#{chooseInteger.value1 + chooseInteger.value2}"/> |
| </tr:commandButton> |
| <tr:commandButton text="Cancel" immediate="true"> |
| <tr:returnActionListener/> |
| </tr:commandButton> |
| </tr:panelButtonBar> |
| </tr:panelPage> |
| </tr:form> |
| </tr:document> |
| </f:view> |
| </jsp:root> |