A patch from Bruno Busco "Example application should use FindScreenDecorator" (https://issues.apache.org/jira/browse/OFBIZ-1846) - OFBIZ-1846
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670340 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -21,12 +21,20 @@ 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="ListExampleFeatures" type="list" list-name="examples"
|
||||
paginate-target="FindExampleFeature">
|
||||
<form name="FindExampleFeatures" type="single" target="FindExampleFeature" default-entity-name="ExampleFeature" default-field-type="find">
|
||||
<field name="exampleFeatureId" title="${uiLabelMap.ExampleExampleFeatureId}"><text-find/></field>
|
||||
<field name="description" title="${uiLabelMap.CommonDescription}"><text-find/></field>
|
||||
<field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
</form>
|
||||
|
||||
|
||||
<form name="ListExampleFeatures" type="list" list-name="listIt" paginate-target="FindExampleFeature" default-entity-name="ExampleFeature"
|
||||
separate-columns="true" odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
|
||||
<actions>
|
||||
<entity-condition entity-name="ExampleFeature">
|
||||
<order-by field-name="description"/>
|
||||
</entity-condition>
|
||||
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
|
||||
<field-map field-name="inputFields" env-name="exampleFeatureCtx"/>
|
||||
<field-map field-name="entityName" value="ExampleFeature"/>
|
||||
</service>
|
||||
</actions>
|
||||
<field name="exampleFeatureId" title="${uiLabelMap.ExampleExampleFeatureId}" widget-style="buttontext">
|
||||
<hyperlink also-hidden="false" description="${exampleFeatureId}" target="EditExampleFeature?exampleFeatureId=${exampleFeatureId}"/>
|
||||
|
||||
@@ -21,11 +21,14 @@ under the License.
|
||||
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
|
||||
|
||||
<!-- list all examplefeatures in a tabular format -->
|
||||
<screen name="FindExampleFeature">
|
||||
<section>
|
||||
<actions>
|
||||
<set field="headerItem" value="ExampleFeature"/>
|
||||
<set field="titleProperty" value="PageTitleFindExampleFeature"/>
|
||||
<set field="exampleFeatureCtx" from-field="parameters"/>
|
||||
<set field="noConditionFind" value="Y"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
|
||||
@@ -35,11 +38,17 @@ under the License.
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<container style="h1"><label>${uiLabelMap.${titleProperty}}</label></container>
|
||||
<container style="button-bar">
|
||||
<link target="EditExampleFeature" text="${uiLabelMap.ExampleNewExampleFeature}" style="buttontext"/>
|
||||
</container>
|
||||
<include-form name="ListExampleFeatures" location="component://example/widget/example/ExampleFeatureForms.xml"/>
|
||||
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
||||
<decorator-section name="menu-bar">
|
||||
<container style="button-bar"><link target="EditExampleFeature" text="${uiLabelMap.ExampleNewExampleFeature}" style="buttontext"/></container>
|
||||
</decorator-section>
|
||||
<decorator-section name="search-options">
|
||||
<include-form name="FindExampleFeatures" location="component://example/widget/example/ExampleFeatureForms.xml"/>
|
||||
</decorator-section>
|
||||
<decorator-section name="search-results">
|
||||
<include-form name="ListExampleFeatures" location="component://example/widget/example/ExampleFeatureForms.xml"/>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
<fail-widgets>
|
||||
<label style="h3">${uiLabelMap.ExampleViewPermissionError}</label>
|
||||
|
||||
@@ -21,9 +21,34 @@ 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="ListExamples" type="list" list-name="examples" paginate-target="FindExample">
|
||||
<form name="FindExamples" type="single" target="FindExample" default-entity-name="Example" default-field-type="find">
|
||||
<field name="exampleId" title="${uiLabelMap.ExampleExampleId}"><text-find/></field>
|
||||
<field name="exampleName" title="${uiLabelMap.CommonName}"><text-find/></field>
|
||||
<field name="exampleTypeId" title="${uiLabelMap.CommonType}">
|
||||
<drop-down allow-empty="true" current-description="">
|
||||
<entity-options description="${description}" key-field-name="exampleTypeId" entity-name="ExampleType">
|
||||
<entity-order-by field-name="description"/>
|
||||
</entity-options>
|
||||
</drop-down>
|
||||
</field>
|
||||
<field name="statusId" title="${uiLabelMap.CommonStatus}">
|
||||
<drop-down allow-empty="true" current-description="">
|
||||
<entity-options description="${description}" key-field-name="statusId" entity-name="StatusItem">
|
||||
<entity-constraint name="statusTypeId" operator="equals" value="EXAMPLE_STATUS"/>
|
||||
<entity-order-by field-name="description"/>
|
||||
</entity-options>
|
||||
</drop-down>
|
||||
</field>
|
||||
<field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
|
||||
</form>
|
||||
|
||||
<form name="ListExamples" type="list" list-name="listIt" paginate-target="FindExample" default-entity-name="Example" separate-columns="true"
|
||||
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
|
||||
<actions>
|
||||
<entity-condition entity-name="Example"><order-by field-name="exampleName"/></entity-condition>
|
||||
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
|
||||
<field-map field-name="inputFields" env-name="exampleCtx"/>
|
||||
<field-map field-name="entityName" value="Example"/>
|
||||
</service>
|
||||
</actions>
|
||||
<field name="exampleId" title="${uiLabelMap.ExampleExampleId}" widget-style="buttontext">
|
||||
<hyperlink also-hidden="false" description="${exampleId}" target="EditExample?exampleId=${exampleId}"/>
|
||||
|
||||
@@ -21,11 +21,14 @@ under the License.
|
||||
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
|
||||
|
||||
<!-- list all examples in a tabular format -->
|
||||
<screen name="FindExample">
|
||||
<section>
|
||||
<actions>
|
||||
<set field="headerItem" value="Example"/>
|
||||
<set field="titleProperty" value="PageTitleFindExample"/>
|
||||
<set field="exampleCtx" from-field="parameters"/>
|
||||
<set field="noConditionFind" value="Y"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
|
||||
@@ -35,9 +38,17 @@ under the License.
|
||||
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
|
||||
</condition>
|
||||
<widgets>
|
||||
<container style="h1"><label>${uiLabelMap.${titleProperty}}</label></container>
|
||||
<container style="button-bar"><link target="EditExample" text="${uiLabelMap.ExampleNewExample}" style="buttontext"/></container>
|
||||
<include-form name="ListExamples" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
<decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
|
||||
<decorator-section name="menu-bar">
|
||||
<container style="button-bar"><link target="EditExample" text="${uiLabelMap.ExampleNewExample}" style="buttontext"/></container>
|
||||
</decorator-section>
|
||||
<decorator-section name="search-options">
|
||||
<include-form name="FindExamples" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
</decorator-section>
|
||||
<decorator-section name="search-results">
|
||||
<include-form name="ListExamples" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
<fail-widgets>
|
||||
<label style="h3">${uiLabelMap.ExampleViewPermissionError}</label>
|
||||
|
||||
Reference in New Issue
Block a user