Some improvements to the example component, and added an exampleext component which extends the example webapp to demonstrate extension and overide mechanisms; note that this works except for menu extension which doesn't appear to be working on the framework level
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@539833 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -27,7 +27,7 @@ under the License.
|
||||
<set field="titleProperty" value="PageTitleFindExample"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="main-decorator" location="component://example/widget/example/CommonScreens.xml">
|
||||
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<section>
|
||||
<condition>
|
||||
@@ -48,46 +48,6 @@ under the License.
|
||||
</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-name="example"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="main-decorator" location="component://example/widget/example/CommonScreens.xml">
|
||||
<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-name="example"/></not>
|
||||
</condition>
|
||||
<widgets>
|
||||
<include-menu name="EditExample" location="component://example/widget/example/ExampleMenus.xml"/>
|
||||
<container style="button-bar"><link target="EditExample" text="${uiLabelMap.ExampleNewExample}" style="buttontext"/></container>
|
||||
<container style="button-bar"><label style="head1">${uiLabelMap.${titleProperty}}</label><label style="head2"> ${uiLabelMap.CommonFor} "${example.exampleName}" [${exampleId}]</label></container>
|
||||
</widgets>
|
||||
</section>
|
||||
|
||||
<decorator-section-include name="body"/>
|
||||
</widgets>
|
||||
<fail-widgets>
|
||||
<label style="head3">${uiLabelMap.ExampleViewPermissionError}</label>
|
||||
</fail-widgets>
|
||||
</section>
|
||||
</decorator-section>
|
||||
</decorator-screen>
|
||||
</widgets>
|
||||
</section>
|
||||
</screen>
|
||||
|
||||
<screen name="EditExample">
|
||||
<section>
|
||||
<actions>
|
||||
@@ -98,7 +58,7 @@ under the License.
|
||||
<entity-one entity-name="Example" value-name="example"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="CommonExampleDecorator">
|
||||
<decorator-screen name="CommonExampleDecorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<include-form name="EditExample" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
</decorator-section>
|
||||
@@ -115,7 +75,7 @@ under the License.
|
||||
<set field="exampleId" from-field="parameters.exampleId"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="CommonExampleDecorator">
|
||||
<decorator-screen name="CommonExampleDecorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<include-form name="ListExampleItems" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
<include-form name="AddExampleItem" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
@@ -133,7 +93,7 @@ under the License.
|
||||
<set field="exampleId" from-field="parameters.exampleId"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
<decorator-screen name="CommonExampleDecorator">
|
||||
<decorator-screen name="CommonExampleDecorator" location="${parameters.mainDecoratorLocation}">
|
||||
<decorator-section name="body">
|
||||
<include-form name="ListExampleFeatureAppls" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
<include-form name="AddExampleFeatureAppl" location="component://example/widget/example/ExampleForms.xml"/>
|
||||
|
||||
Reference in New Issue
Block a user