Cleanups for new more consistent attribute names; changed AddExampleFeatureAppl form to use the newly possible combination of ajax autocomplete and lookup box, good for when user has no clue what the ID might be

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@733489 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David E. Jones
2009-01-11 16:39:33 +00:00
parent 90b615ae1a
commit c9e848d99e
5 changed files with 56 additions and 37 deletions
@@ -62,7 +62,7 @@ under the License.
<actions>
<set field="headerItem" value="Example"/>
<set field="exampleId" from-field="parameters.exampleId"/>
<entity-one entity-name="Example" value-name="example"/>
<entity-one entity-name="Example" value-field="example"/>
</actions>
<widgets>
<decorator-screen name="main-decorator">
@@ -71,7 +71,7 @@ under the License.
<condition>
<and>
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
<not><if-empty field-name="example"/></not>
<not><if-empty field="example"/></not>
</and>
</condition>
<widgets>
@@ -88,7 +88,7 @@ under the License.
<widgets>
<section>
<condition>
<not><if-empty field-name="example"/></not>
<not><if-empty field="example"/></not>
</condition>
<widgets>
<container style="h1"><label>${uiLabelMap[titleProperty]} ${uiLabelMap.CommonFor} ${example.exampleName} [${exampleId}]</label></container>
@@ -119,7 +119,7 @@ under the License.
<actions>
<set field="headerItem" value="ExampleFeature"/>
<set field="exampleFeatureId" from-field="parameters.exampleFeatureId"/>
<entity-one entity-name="ExampleFeature" value-name="exampleFeature"/>
<entity-one entity-name="ExampleFeature" value-field="exampleFeature"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${mainDecoratorLocation}">
@@ -128,7 +128,7 @@ under the License.
<condition>
<and>
<if-has-permission permission="EXAMPLE" action="_VIEW"/>
<not><if-empty field-name="exampleFeature"/></not>
<not><if-empty field="exampleFeature"/></not>
</and>
</condition>
<widgets>
@@ -145,7 +145,7 @@ under the License.
<widgets>
<section>
<condition>
<not><if-empty field-name="exampleFeature"/></not>
<not><if-empty field="exampleFeature"/></not>
</condition>
<widgets>
<container style="h1">
@@ -32,8 +32,8 @@ under the License.
<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>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="exampleFeatureCtx"/>
<service service-name="performFind" result-map="result" result-map-list="listIt">
<field-map field-name="inputFields" from-field="exampleFeatureCtx"/>
<field-map field-name="entityName" value="ExampleFeature"/>
</service>
</actions>
@@ -45,8 +45,8 @@ under the License.
<form name="EditExampleFeature" type="single" target="updateExampleFeature" title="" default-map-name="exampleFeature">
<actions>
<entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false">
<field-map field-name="statusId" env-name="example.statusId"/>
<entity-one entity-name="StatusItem" value-field="currentStatus" auto-field-map="false">
<field-map field-name="statusId" from-field="example.statusId"/>
</entity-one>
</actions>
<alt-target use-when="exampleFeature==null" target="createExampleFeature"/>
@@ -71,7 +71,7 @@ under the License.
<form name="ListExampleFeatureAppls" type="list" list-name="exampleFeatureAppls" target="feature_updateExampleFeatureAppl">
<actions>
<entity-condition entity-name="ExampleFeatureAppl">
<condition-expr field-name="exampleFeatureId" env-name="exampleFeatureId"/>
<condition-expr field-name="exampleFeatureId" from-field="exampleFeatureId"/>
<order-by field-name="sequenceNum"/>
</entity-condition>
</actions>
@@ -136,8 +136,8 @@ under the License.
<form name="LookupListExampleFeature" list-name="listIt" title="" type="list"
paginate-target="LookupExampleFeature">
<actions>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="parameters"/>
<service service-name="performFind" result-map="result" result-map-list="listIt">
<field-map field-name="inputFields" from-field="parameters"/>
<field-map field-name="orderBy" value="description"/>
<field-map field-name="entityName" value="ExampleFeature"/>
</service>
@@ -46,10 +46,10 @@ under the License.
<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>
<service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
<field-map field-name="inputFields" env-name="exampleCtx"/>
<service service-name="performFind" result-map="result" result-map-list="listIt">
<field-map field-name="inputFields" from-field="exampleCtx"/>
<field-map field-name="entityName" value="Example"/>
<field-map field-name="orderBy" env-name="parameters.sortField"/>
<field-map field-name="orderBy" from-field="parameters.sortField"/>
</service>
</actions>
<alt-row-style use-when="&quot;EXST_APPROVED&quot;.equals(statusId)" style="Validate"/>
@@ -75,8 +75,8 @@ under the License.
<display>
<in-place-editor url="/example/control/updateExample" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
<simple-editor/>
<field-map field-name="exampleId" env-name="exampleId"/>
<field-map field-name="statusId" env-name="statusId"/>
<field-map field-name="exampleId" from-field="exampleId"/>
<field-map field-name="statusId" from-field="statusId"/>
</in-place-editor>
</display>
</field>
@@ -84,8 +84,8 @@ under the License.
<display>
<in-place-editor url="/example/control/updateExample" cancel-control="button" saving-text="Updating..." text-between-controls=" ">
<simple-editor/>
<field-map field-name="exampleId" env-name="exampleId"/>
<field-map field-name="statusId" env-name="statusId"/>
<field-map field-name="exampleId" from-field="exampleId"/>
<field-map field-name="statusId" from-field="statusId"/>
</in-place-editor>
</display>
</field>
@@ -94,8 +94,8 @@ under the License.
<form name="EditExample" type="single" target="updateExample" title="" default-map-name="example">
<actions>
<entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false">
<field-map field-name="statusId" env-name="example.statusId"/>
<entity-one entity-name="StatusItem" value-field="currentStatus" auto-field-map="false">
<field-map field-name="statusId" from-field="example.statusId"/>
</entity-one>
</actions>
<alt-target use-when="example==null" target="createExample"/>
@@ -163,7 +163,7 @@ under the License.
<form name="ListExampleItems" type="list" list-name="exampleItems" target="updateExampleItem">
<actions>
<entity-condition entity-name="ExampleItem">
<condition-expr field-name="exampleId" env-name="exampleId"/>
<condition-expr field-name="exampleId" from-field="exampleId"/>
<order-by field-name="exampleItemSeqId"/>
</entity-condition>
</actions>
@@ -205,7 +205,7 @@ under the License.
<form name="ListExampleFeatureAppls" type="list" list-name="exampleFeatureAppls" target="example_updateExampleFeatureAppl">
<actions>
<entity-condition entity-name="ExampleFeatureAppl">
<condition-expr field-name="exampleId" env-name="exampleId"/>
<condition-expr field-name="exampleId" from-field="exampleId"/>
<order-by field-name="sequenceNum"/>
</entity-condition>
</actions>
@@ -234,11 +234,31 @@ under the License.
<form name="AddExampleFeatureAppl" type="single" target="example_createExampleFeatureAppl" title="">
<auto-fields-service service-name="createExampleFeatureAppl"/>
<field name="exampleId"><hidden/></field>
<field name="exampleFeatureId" id-name="exampleFeatureId">
<text/>
<on-field-event-update-area event-type="change" area-id="exampleFeatureId" area-target="findExampleFeatures"/>
<!-- a nice combination of the lookup option and the auto-complete, but unfortunately still requires a custom companion controller.xml request to handle AJAX data retreival -->
<field name="exampleFeatureId" title="${uiLabelMap.ExampleFeature}">
<lookup target-form-name="LookupExampleFeature"/>
<on-field-event-update-area event-type="change" area-id="AddExampleFeatureAppl_exampleFeatureId" area-target="findExampleFeatures"/>
</field>
<!-- <field name="exampleFeatureId" title="${uiLabelMap.ExampleFeature}" id-name="exampleFeatureId"><lookup target-form-name="LookupExampleFeature"/></field> -->
<!-- basic example of server-side AJAX enabled option, requires use of custom companion request in controller.xml file to get data for drop-down -->
<!--
<field name="exampleFeatureId">
<text/>
<on-field-event-update-area event-type="change" area-id="AddExampleFeatureAppl_exampleFeatureId" area-target="findExampleFeatures"/>
</field>
-->
<!-- most feature rich for autocomplete, ie partial text entry searches the full string, doesn't require custom request to function, etc; Note that for usability this is still a bit lame since you can't see the full list, you HAVE to know part of the ID or description in order to see options -->
<!--
<field name="exampleFeatureId">
<drop-down>
<auto-complete/>
<entity-options entity-name="ExampleFeature" description="${exampleFeatureId}: ${description}">
<entity-order-by field-name="exampleFeatureId"/>
</entity-options>
</drop-down>
</field>
-->
<field name="exampleFeatureApplTypeId" title="${uiLabelMap.CommonType}">
<drop-down allow-empty="false">
<entity-options entity-name="ExampleFeatureApplType" description="${description}">
@@ -248,5 +268,4 @@ under the License.
</field>
<field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
</form>
</forms>
@@ -66,7 +66,7 @@ under the License.
<set field="titleProperty" value="PageTitleEditExample"/>
<set field="tabButtonItem" value="EditExample"/>
<set field="exampleId" from-field="parameters.exampleId"/>
<entity-one entity-name="Example" value-name="example"/>
<entity-one entity-name="Example" value-field="example"/>
</actions>
<widgets>
<decorator-screen name="CommonExampleDecorator" location="${parameters.mainDecoratorLocation}">
@@ -84,7 +84,7 @@ under the License.
<set field="titleProperty" value="PageTitleEditExample"/>
<set field="tabButtonItem" value="EditExample"/>
<set field="exampleId" from-field="parameters.exampleId"/>
<entity-one entity-name="Example" value-name="example"/>
<entity-one entity-name="Example" value-field="example"/>
</actions>
<widgets>
<decorator-screen name="SimpleDecorator" location="component://common/widget/CommonScreens.xml">