blob: 27132f157d1d79a831bb18a36c1656da25368359 [file] [log] [blame]
<?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.
-->
<!-- This document serves as an example for Compound Screen Widget feature -->
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sc="http://ofbiz.apache.org/Site-Conf"
xmlns:sm="http://ofbiz.apache.org/Simple-Method"
xmlns:wf="http://ofbiz.apache.org/Widget-Form"
xmlns:wt="http://ofbiz.apache.org/Widget-Tree"
xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
<sc:site-conf>
<sc:request-map uri="CompoundWidgets1">
<sc:security https="true" auth="true"/>
<sc:event type="simple" invoke="CompoundWidgetsFunc" path="component://example/widget/example/ExampleCompoundWidgets.xml"/>
<sc:response name="success" type="view" value="CompoundWidgets1"/>
</sc:request-map>
<sc:request-map uri="CompoundWidgets2"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="CompoundWidgets2"/></sc:request-map>
<sc:view-map name="CompoundWidgets1" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/>
<sc:view-map name="CompoundWidgets2" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/>
</sc:site-conf>
<wm:menus>
<wm:menu name="CompoundWidgetsMenu" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
<wm:menu-item name="Example1" title="${uiLabelMap.ExampleExample} 1">
<wm:link target="CompoundWidgets1"/>
</wm:menu-item>
<wm:menu-item name="Example2" title="${uiLabelMap.ExampleExample} 2">
<wm:link target="CompoundWidgets2"/>
</wm:menu-item>
</wm:menu>
</wm:menus>
<ws:screens>
<ws:screen name="CompoundWidgets1">
<ws:section>
<ws:actions>
<ws:set field="headerItem" value="ExampleCompoundWidgets" />
<ws:set field="tabButtonItem" value="Example1"/>
</ws:actions>
<ws:widgets>
<ws:decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<ws:decorator-section name="pre-body">
<ws:include-menu name="CompoundWidgetsMenu" location="component://example/widget/example/ExampleCompoundWidgets.xml" />
</ws:decorator-section>
<ws:decorator-section name="body">
<ws:section>
<ws:widgets>
<ws:container style="clear" />
<ws:label>Demo For Compound Screen Widget</ws:label>
<ws:include-form location="component://example/widget/example/ExampleCompoundWidgets.xml" name="CompoundWidgetsForm1"/>
</ws:widgets>
</ws:section>
</ws:decorator-section>
</ws:decorator-screen>
</ws:widgets>
</ws:section>
</ws:screen>
<ws:screen name="CompoundWidgets2">
<ws:section>
<ws:actions>
<ws:set field="headerItem" value="ExampleCompoundWidgets" />
<ws:set field="tabButtonItem" value="Example2"/>
</ws:actions>
<ws:widgets>
<ws:decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<ws:decorator-section name="pre-body">
<ws:include-menu name="CompoundWidgetsMenu" location="component://example/widget/example/ExampleCompoundWidgets.xml" />
</ws:decorator-section>
<ws:decorator-section name="body">
<ws:section>
<ws:widgets>
<ws:container style="clear" />
<ws:label>Demo For Compound Screen Widget</ws:label>
<ws:include-form location="component://example/widget/example/ExampleCompoundWidgets.xml" name="CompoundWidgetsForm2"/>
</ws:widgets>
</ws:section>
</ws:decorator-section>
</ws:decorator-screen>
</ws:widgets>
</ws:section>
</ws:screen>
</ws:screens>
<wf:forms>
<wf:form name="CompoundWidgetsForm1">
<wf:field name="exampleName" title="${uiLabelMap.FormFieldTitle_exampleName} 1" required-field="true"><wf:text /></wf:field>
</wf:form>
<wf:form name="CompoundWidgetsForm2">
<wf:field name="exampleName" title="${uiLabelMap.FormFieldTitle_exampleName} 2" required-field="true"><wf:text /></wf:field>
</wf:form>
</wf:forms>
<sm:simple-methods>
<sm:simple-method method-name="CompoundWidgetsFunc">
<sm:log message="CompoundWidgetsFunc runs" level="info"/>
</sm:simple-method>
</sm:simple-methods>
</compound-widgets>