Files
ofbiz-framework/framework/example/widget/example/FormWidgetExampleScreens.xml
T
2010-12-10 20:40:08 +00:00

141 lines
12 KiB
XML

<?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.
-->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
<screen name="FormWidgetExamples">
<section>
<actions>
<set field="headerItem" value="FormWidgetExamples"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
</condition>
<widgets>
<container style="h1"><label>${uiLabelMap.PageTitleFormWidgetExamples}</label></container>
<container style="screenlet-body">
<container style="button-bar"><label style="h2">${uiLabelMap.ExampleDateTimeFields}</label></container>
<container style="screenlet-body">
<label style="h3">${uiLabelMap.ExampleSourceCode}</label>
<label>${uiLabelMap.ExampleDefinitionName} &quot;DateTimeFieldsExampleForm&quot; ${uiLabelMap.ExampleDefinitionFile}</label>
<link target="http://svn.apache.org/repos/asf/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml" url-mode="plain" target-window="svnPage" text="${uiLabelMap.ExampleDefinitionFileTooltip}" style="buttontext"/>
<include-form name="DateTimeFieldsExampleForm" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</container>
</container>
<container style="screenlet-body">
<container style="button-bar"><label style="h2">${uiLabelMap.ExampleDropDownFields}</label></container>
<container style="screenlet-body">
<label style="h3">${uiLabelMap.ExampleSourceCode}</label>
<label>${uiLabelMap.ExampleDefinitionName} &quot;DropDownFieldsExampleForm&quot; ${uiLabelMap.ExampleDefinitionFile}</label>
<link target="http://svn.apache.org/repos/asf/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml" url-mode="plain" target-window="svnPage" text="${uiLabelMap.ExampleDefinitionFileTooltip}" style="buttontext"/>
</container>
<section>
<actions>
<!-- setCountryStatesEventJs.ftl, it's not used here but could be. It's a good example of a reusable template-script with harcoded values which make sense -->
<!-- fields for setDependentDropdownValuesJs.ftl, it's a try on generalization but there are still issues. For instance: what if we have 2 couple of dependent dropdowns in the same form? -->
<set field="dependentForm" value="DropDownFieldsExampleForm"/>
<set field="paramKey" value="countryGeoId"/>
<set field="mainId" value="countryGeoId"/>
<set field="dependentId" value="stateProvinceGeoId"/>
<set field="requestName" value="getAssociatedStateList"/>
<set field="responseName" value="stateList"/>
<set field="dependentKeyName" value="geoId"/>
<set field="descName" value="geoName"/>
<set field="selectedDependentOption" from-field="postalAddress.stateProvinceGeoId" default-value="_none_"/><!-- postalAddress.stateProvinceGeoId does not make much sense here, only to get the idea -->
<!-- asmslect parameters, must be prefixed by asm_ for setMultipleSelectJs.ftl -->
<set field="asm_multipleSelectForm" value="DropDownMultipleFieldExampleForm"/>
<set field="asm_multipleSelect" value="DropDownMultipleFieldExampleForm_countryGeoIdMultiple"/>
<set field="asm_formSize" value="600"/>
<set field="asm_asmListItemPercentOfForm" value="95"/>
<set field="asm_sortable" value="false"/>
</actions>
<widgets>
<!--platform-specific><html><html-template location="component://common/webcommon/includes/setCountryStatesEventJs.ftl"/></html></platform-specific-->
<platform-specific><html><html-template location="component://common/webcommon/includes/setDependentDropdownValuesJs.ftl"/></html></platform-specific>
<platform-specific><html><html-template location="component://common/webcommon/includes/setMultipleSelectJs.ftl"/></html></platform-specific>
<include-form name="DropDownFieldsExampleForm" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
<include-form name="DropDownMultipleFieldExampleForm" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</widgets>
</section>
</container>
<container style="screenlet-body">
<container style="button-bar"><label style="h2">${uiLabelMap.ExampleLookupFieldsTitle}</label></container>
<container style="screenlet-body">
<label style="h3">${uiLabelMap.ExampleSourceCode}</label>
<label>${uiLabelMap.ExampleDefinitionName} &quot;ExampleLookupFields&quot; ${uiLabelMap.ExampleDefinitionFile}</label>
<link target="http://svn.apache.org/repos/asf/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml" url-mode="plain" target-window="svnPage" text="${uiLabelMap.ExampleDefinitionFileTooltip}" style="buttontext"/>
<label>${uiLabelMap.ExampleLookupFields}</label>
<include-form name="ExampleLookupFields" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</container>
</container>
<container style="screenlet-body">
<container style="button-bar"><label style="h2">${uiLabelMap.ExampleGroupFields}</label></container>
<container style="screenlet-body">
<label style="h3">${uiLabelMap.ExampleSourceCode}</label>
<label>${uiLabelMap.ExampleDefinitionName} &quot;FieldGroupExampleForm&quot; ${uiLabelMap.ExampleDefinitionFile}</label>
<link target="http://svn.apache.org/repos/asf/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml" url-mode="plain" target-window="svnPage" text="${uiLabelMap.ExampleDefinitionFileTooltip}" style="buttontext"/>
<container style="button-bar">
<link target="javascript:expandAll(true);" text="${uiLabelMap.CommonExpandAll}" style="buttontext expand-all" url-mode="plain"/>
<link target="javascript:expandAll(false);" text="${uiLabelMap.CommonCollapseAll}" style="buttontext collapse-all" url-mode="plain"/>
</container>
<include-form name="FieldGroupExampleForm" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</container>
</container>
<container style="screenlet-body">
<container style="button-bar"><label style="h2">${uiLabelMap.ExampleSelectionBoxes}</label></container>
<container style="screenlet-body">
<label style="h3">${uiLabelMap.ExampleSourceCode}</label>
<label>${uiLabelMap.ExampleDefinitionName} &quot;SelectionBoxesExampleForm&quot; ${uiLabelMap.ExampleDefinitionFile}</label>
<link target="http://svn.apache.org/repos/asf/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml" url-mode="plain" target-window="svnPage" text="${uiLabelMap.ExampleDefinitionFileTooltip}" style="buttontext"/>
<include-form name="SelectionBoxesExampleForm" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</container>
</container>
<container style="screenlet-body">
<container style="button-bar"><label style="h2">${uiLabelMap.ExamplePrintButton}</label></container>
<container style="screenlet-body">
<label>${uiLabelMap.ExampleFopFonts}</label>
</container>
<include-form name="FOPFontsExampleForm" location="component://example/widget/example/FormWidgetExampleForms.xml"/>
</container>
</widgets>
<fail-widgets>
<label style="h3">${uiLabelMap.ExampleViewPermissionError}</label>
</fail-widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="printExampleFOPFonts">
<section>
<widgets>
<platform-specific><xsl-fo><html-template location="component://example/webapp/example/reports/fonts.fo.ftl"/></xsl-fo></platform-specific>
</widgets>
</section>
</screen>
</screens>