Moving example* applications to specialpurpose OFBIZ-4790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1328503 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
<?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="main-decorator">
|
||||
<section>
|
||||
<actions>
|
||||
<!-- can add additional info here, like another UiLabels file: <property-map resource="ExampleExtUiLabels" map-name="uiLabelMap" global="true"/> -->
|
||||
</actions>
|
||||
<widgets>
|
||||
<include-screen name="main-decorator" location="component://example/widget/example/CommonScreens.xml"/>
|
||||
</widgets>
|
||||
</section>
|
||||
</screen>
|
||||
|
||||
<screen name="CommonExampleDecorator">
|
||||
<section>
|
||||
<actions>
|
||||
<set field="headerItem" value="Example"/>
|
||||
<set field="exampleId" from-field="parameters.exampleId"/>
|
||||
<entity-one entity-name="Example" value-field="example"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="main-decorator">
|
||||
<decorator-section name="pre-body">
|
||||
<section>
|
||||
<condition>
|
||||
<and>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
<not><if-empty field="example"/></not>
|
||||
</and>
|
||||
</condition>
|
||||
<widgets>
|
||||
<include-menu name="EditExample" location="component://exampleext/widget/example/ExampleMenus.xml"/>
|
||||
</widgets>
|
||||
</section>
|
||||
</decorator-section>
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<!-- do check for EXAMPLE, _VIEW permission -->
|
||||
<condition>
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<section>
|
||||
<condition>
|
||||
<not><if-empty field="example"/></not>
|
||||
</condition>
|
||||
<widgets>
|
||||
<container style="h1"><label>${uiLabelMap[titleProperty]} ${uiLabelMap.CommonFor} ${example.exampleName} [${exampleId}]</label></container>
|
||||
<container style="button-bar"><link target="EditExample" text="${uiLabelMap.ExampleNewExample}" style="buttontext"/></container>
|
||||
</widgets>
|
||||
</section>
|
||||
<decorator-section-include name="body"/>
|
||||
</widgets>
|
||||
<fail-widgets>
|
||||
<label style="h3">${uiLabelMap.ExampleViewPermissionError}</label>
|
||||
</fail-widgets>
|
||||
</section>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
</section>
|
||||
</screen>
|
||||
|
||||
<screen name="CommonExampleFeatureDecorator">
|
||||
<section>
|
||||
<widgets>
|
||||
<include-screen name="CommonExampleFeatureDecorator" location="component://example/widget/example/CommonScreens.xml"/>
|
||||
</widgets>
|
||||
</section>
|
||||
</screen>
|
||||
|
||||
</screens>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd">
|
||||
|
||||
<form name="EditExampleExt" extends="EditExample"
|
||||
extends-resource="component://example/widget/example/ExampleForms.xml">
|
||||
<!-- NOTE: add new fields for the EditExample form here -->
|
||||
<field name="exampleText"><display description="${uiLabelMap.ExampleTextDescription}"/></field>
|
||||
<!-- In order for these to be at the bottom of the form, we need to hide the buttons from the
|
||||
original form, and then create new ones. We could use the sort-order element, but that
|
||||
doesn't work well when we want to allow changes in the original form. -->
|
||||
<field name="submitButton" use-when="example!=null"><hidden/></field>
|
||||
<field name="submitButton" use-when="example==null"><hidden/></field>
|
||||
<field name="submitButtonOvrd" title="${uiLabelMap.CommonCreate}" use-when="example==null" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
<field name="submitButtonOvrd" title="${uiLabelMap.CommonUpdate}" use-when="example!=null" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
</form>
|
||||
|
||||
</forms>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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.
|
||||
-->
|
||||
|
||||
<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
|
||||
|
||||
<menu name="EditExample" extends="EditExample" extends-resource="component://example/widget/example/ExampleMenus.xml">
|
||||
<menu-item name="EditExampleOriginal" title="${uiLabelMap.ExampleOriginalExample}">
|
||||
<link target="/example/control/EditExample" url-mode="inter-app">
|
||||
<parameter param-name="exampleId"/>
|
||||
</link>
|
||||
</menu-item>
|
||||
</menu>
|
||||
|
||||
</menus>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?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="EditExampleExt">
|
||||
<section>
|
||||
<actions>
|
||||
<set field="titleProperty" value="PageTitleEditExample"/>
|
||||
<set field="tabButtonItem" value="EditExample"/>
|
||||
<set field="labelTitleProperty" value="ExampleExample"/>
|
||||
<set field="exampleId" from-field="parameters.exampleId"/>
|
||||
<entity-one entity-name="Example" value-field="example"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="CommonExampleDecorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<include-form name="EditExampleExt" location="component://exampleext/widget/example/ExampleForms.xml"/>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
</section>
|
||||
</screen>
|
||||
|
||||
</screens>
|
||||
Reference in New Issue
Block a user