| <?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: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> |
| <trh:html> |
| <trh:head title="Car Demo"/> |
| <trh:body> |
| <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:navigationPane> |
| </f:facet> |
| <tr:messages/> |
| <tr:panelFormLayout> |
| |
| <tr:selectOneChoice id="makesChoice" label="Makes:" |
| autoSubmit="true" |
| valueChangeListener="#{carBacking.makeChanged}"> |
| <f:selectItems value="#{carBacking.makes}"/> |
| </tr:selectOneChoice> |
| |
| <tr:selectOneChoice id="modelsChoice" |
| autoSubmit="true" |
| valueChangeListener="#{carBacking.modelChanged}" |
| partialTriggers="makesChoice" label="Models:"> |
| <f:selectItems binding="#{carBacking.modelItems}"/> |
| </tr:selectOneChoice> |
| |
| </tr:panelFormLayout> |
| |
| <!-- Show the price --> |
| <tr:panelGroupLayout layout="vertical"> |
| <tr:outputText value="Price: "/> |
| <tr:outputText id="price" |
| partialTriggers="modelsChoice makesChoice launchOptions" |
| binding="#{carBacking.price}"> |
| <f:convertNumber type="currency"/> |
| </tr:outputText> |
| <tr:spacer width="10"/> |
| <!-- A link to show the options; it starts out disabled --> |
| <tr:commandLink id="launchOptions" disabled="true" |
| shortDesc="Click to pick new options" |
| partialTriggers="modelsChoice makesChoice" |
| returnListener="#{carBacking.returnOptions}" |
| binding="#{carBacking.launchOptions}" |
| useWindow="true" |
| action="dialog:optionsDialog" text="Pick options: "/> |
| <tr:outputText id="options" |
| binding="#{carBacking.options}" |
| partialTriggers="launchOptions modelsChoice makesChoice"/> |
| </tr:panelGroupLayout> |
| |
| </tr:panelPage> |
| </tr:form> |
| </trh:body> |
| </trh:html> |
| </f:view> |
| </jsp:root> |