blob: f6bea7e05e1d735bd2dd988b80feb799aff36df9 [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="Chart Demo">
<tr:form>
<tr:panelGroupLayout layout="vertical">
<f:facet name="separator">
<tr:separator/>
</f:facet>
<tr:panelGroupLayout layout="horizontal">
<tr:commandLink immediate="true" text="Component Guide" action="guide"/>
<tr:spacer width="10"/>
<tr:goLink destination="http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_chart.html"
text="Tag Documentation"/>
</tr:panelGroupLayout>
<tr:outputFormatted styleUsage="instruction" value="&lt;b>chart&lt;/b>"/>
<tr:chart chartDrillDownListener="#{chart.drillDown}" id="chart" YMajorGridLineCount="7"
value="#{chart.value}" inlineStyle="width:680px; height:400px;"
partialTriggers="nextChartType" binding="#{chart.editor.component}"/>
<tr:panelGroupLayout layout="horizontal">
<tr:commandButton id="nextChartType" partialSubmit="true" text="Next Chart Type"
action="#{chart.nextChartType}"/>
<tr:commandButton text="Update" action="#{chart.editor.update}"/>
<tr:commandButton id="partialButton" partialSubmit="true" text="Update Partial"
action="#{chart.updatePartial}"/>
<tr:selectBooleanCheckbox immediate="true" label="Larger Data Set"
value="#{chart.largerDataSet}"/>
</tr:panelGroupLayout>
<tr:table var="row" rows="100" value="#{chart.editor.attributes}" summary="Attributes">
<tr:column>
<f:facet name="header">
<tr:outputText value="Name"/>
</f:facet>
<tr:outputText value="#{row.name}"/>
</tr:column>
<tr:column>
<f:facet name="header">
<tr:outputText value="Value"/>
</f:facet>
<tr:inputText immediate="true" readOnly="#{row.name == 'value' ||
row.name == 'var' ||
row.name == 'currencyKey' ||
row.name == 'currencyString' ||
row.name == 'rowKey' ||
row.name == 'id' ||
row.name == 'rendererType' ||
row.name == 'submittedValue'}"
rendered="#{row.type == 'string'}" value="#{row.value}"
shortDesc="Type to change '#{row.name}'"/>
<tr:inputText immediate="true" readOnly="#{row.name == 'rowIndex'}"
rendered="#{row.type == 'integer'}" value="#{row.value}"
shortDesc="Type to change '#{row.name}'">
<f:converter converterId="javax.faces.Integer"/>
</tr:inputText>
<tr:inputText immediate="true" rendered="#{row.type == 'date'}" value="#{row.value}"
shortDesc="Type to change '#{row.name}'">
<f:facet name="help">
<tr:outputText value="Sample format: 2004-07-15"/>
</f:facet>
<f:convertDateTime pattern="yyyy-MM-dd"/>
</tr:inputText>
<tr:selectBooleanCheckbox rendered="#{row.type == 'boolean'}" readOnly="#{row.name == 'localValueSet' ||
row.name == 'valid' ||
row.name == 'transient'}" immediate="true"
value="#{row.value}"
shortDesc="Click to change '#{row.name}'"/>
</tr:column>
</tr:table>
</tr:panelGroupLayout>
</tr:form>
</tr:document>
</f:view>
</jsp:root>