Author: jonesde
Date: Sun Jan 11 08:39:33 2009 New Revision: 733489 URL: http://svn.apache.org/viewvc?rev=733489&view=rev Log: 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 Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml ofbiz/trunk/framework/example/widget/example/CommonScreens.xml ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml ofbiz/trunk/framework/example/widget/example/ExampleForms.xml ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Modified: ofbiz/trunk/framework/common/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/widget/CommonScreens.xml?rev=733489&r1=733488&r2=733489&view=diff ============================================================================== --- ofbiz/trunk/framework/common/widget/CommonScreens.xml (original) +++ ofbiz/trunk/framework/common/widget/CommonScreens.xml Sun Jan 11 08:39:33 2009 @@ -120,7 +120,7 @@ <set field="layoutSettings.javaScripts[]" value="/images/fieldlookup.js" global="true"/> <set field="layoutSettings.javaScripts[]" value="/images/calendar_date_select.js" global="true"/> <set field="layoutSettings.commonHeaderImageLinkUrl" from-field="layoutSettings.commonHeaderImageLinkUrl" default-value="main" global="true"/> - <service service-name="getUserPreferenceGroup" result-map-name="prefResult"> + <service service-name="getUserPreferenceGroup" result-map="prefResult"> <field-map field-name="userPrefGroupTypeId" value="GLOBAL_PREFERENCES"/> </service> <set field="userPreferences" from-field="prefResult.userPrefMap" global="true"/> @@ -135,7 +135,7 @@ <property-to-field resource="general" property="defaultOrganizationPartyId" field="defaultOrganizationPartyIdProperties"/> <set field="defaultOrganizationPartyId" value="${bsh:"DEFAULT".equals(userPreferences.get("ORGANIZATION_PARTY"))?defaultOrganizationPartyIdProperties:userPreferences.get("ORGANIZATION_PARTY")}" global="true"/> <property-to-field resource="general" property="currency.uom.id.default" field="defaultCurrencyUomId"/> - <entity-one entity-name="PartyAcctgPrefAndGroup" value-name="orgParty"> + <entity-one entity-name="PartyAcctgPrefAndGroup" value-field="orgParty"> <field-map field-name="partyId" env-name="defaultOrganizationPartyId"/> </entity-one> <set field="defaultOrganizationPartyCurrencyUomId" from-field="orgParty.baseCurrencyUomId" default-value="defaultCurrencyUomId" global="true"/> @@ -150,7 +150,7 @@ <!-- render appheader: both menu widget style and ftl template style menus are supported--> <section> <condition> - <if-empty field-name="applicationMenuName"/> + <if-empty field="applicationMenuName"/> </condition> <widgets> <platform-specific><html><html-template location="${appheaderTemplate}"/></html></platform-specific> @@ -180,7 +180,7 @@ <!-- render footer --> <section> <condition> - <if-empty field-name="applicationFooterTemplate"/> + <if-empty field="applicationFooterTemplate"/> </condition> <widgets> <platform-specific><html><html-template location="${footerTemplateLocation}"/></html></platform-specific> @@ -211,7 +211,7 @@ <platform-specific><html><html-template location="component://common/webcommon/includes/messages.ftl"/></html></platform-specific> <section> <condition> - <not><if-empty field-name="sections.body"/></not> + <not><if-empty field="sections.body"/></not> </condition> <widgets> <decorator-section-include name="body"/> @@ -388,7 +388,7 @@ <widgets> <section> <condition> - <if-empty field-name="titleProperty"/> + <if-empty field="titleProperty"/> </condition> <widgets> <container style="h1"> Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?rev=733489&r1=733488&r2=733489&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Sun Jan 11 08:39:33 2009 @@ -62,7 +62,7 @@ <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 @@ <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 @@ <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 @@ <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 @@ <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 @@ <widgets> <section> <condition> - <not><if-empty field-name="exampleFeature"/></not> + <not><if-empty field="exampleFeature"/></not> </condition> <widgets> <container style="h1"> Modified: ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml?rev=733489&r1=733488&r2=733489&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleFeatureForms.xml Sun Jan 11 08:39:33 2009 @@ -32,8 +32,8 @@ <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 @@ <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 @@ <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 @@ <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> Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=733489&r1=733488&r2=733489&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Sun Jan 11 08:39:33 2009 @@ -46,10 +46,10 @@ <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=""EXST_APPROVED".equals(statusId)" style="Validate"/> @@ -75,8 +75,8 @@ <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 @@ <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 @@ <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 @@ <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 @@ <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 @@ <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"> + + <!-- 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> + <!-- 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="exampleFeatureId" area-target="findExampleFeatures"/> + <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="exampleFeatureId" title="${uiLabelMap.ExampleFeature}" id-name="exampleFeatureId"><lookup target-form-name="LookupExampleFeature"/></field> --> + --> + <field name="exampleFeatureApplTypeId" title="${uiLabelMap.CommonType}"> <drop-down allow-empty="false"> <entity-options entity-name="ExampleFeatureApplType" description="${description}"> @@ -248,5 +268,4 @@ </field> <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> </form> - </forms> Modified: ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml?rev=733489&r1=733488&r2=733489&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Sun Jan 11 08:39:33 2009 @@ -66,7 +66,7 @@ <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 @@ <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"> |
Free forum by Nabble | Edit this page |