Author: jleroux
Date: Thu Aug 19 18:49:32 2010 New Revision: 987266 URL: http://svn.apache.org/viewvc?rev=987266&view=rev Log: From Scott's remark, removes dependency from Product component in dependent dropdowns example Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml?rev=987266&r1=987265&r2=987266&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleForms.xml Thu Aug 19 18:49:32 2010 @@ -244,14 +244,6 @@ under the License. </entity-options> </drop-down> </field> - - <field name="separator" title="${uiLabelMap.CommonEmptyHeader}"><display/></field> - <field name="productCategoryId" tooltip="${uiLabelMap.CommonRequired}" widget-style="required"> - <drop-down> - <entity-options entity-name="ProductCategory" key-field-name="productCategoryId" description="${categoryName } ${description}"/> - </drop-down> - </field> - <field name="productId" widget-style="required"><drop-down allow-empty="false"></drop-down></field> </form> <!-- Simple form to print a FOP PDF file with the fonts available in OFBiz Project --> Modified: ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml?rev=987266&r1=987265&r2=987266&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml (original) +++ ofbiz/trunk/framework/example/widget/example/FormWidgetExampleScreens.xml Thu Aug 19 18:49:32 2010 @@ -53,20 +53,16 @@ under the License. </container> <section> <actions> - <!-- fields for the form where dependent dropdowns are--> + <!-- setCountryStatesEventJs.ftl, it's not used here but is a good example of a reusable template-script with harcoded values which make sense --> + <!-- fields for setDependentDropdownValuesJs.ftl, it's a try on generalization but there are still issues. For instance: what if we have 2 couple of dependent dropdowns in the same form? --> <set field="dependentForm" value="DropDownFieldsExampleForm"/> - - <!-- fields for setCountryStatesEventJs --> + <set field="mainId" value="countryGeoId"/><!-- here mainId and its key are same --> + <set field="dependentId" value="stateProvinceGeoId"/> + <set field="requestName" value="getAssociatedStateList"/> + <set field="responseName" value="stateList"/> + <set field="dependentKeyName" value="geoId"/> + <set field="descName" value="geoName"/> <set field="selectedStateProvinceGeoId" from-field="postalAddress.stateProvinceGeoId" default-value="_none_"/><!-- postalAddress.stateProvinceGeoId does not make much sense here, only to get the idea --> - - <!-- fields for setDependentDropdownValuesJs.ftl, it's a try on generalization but there are still issues. For instance: what if we have 2 couple of dependent dropdowns in the same form? --> - <set field="mainId" value="productCategoryId"/><!-- here mainId and its key are same --> - <set field="dependentId" value="productId"/> - <set field="requestName" value="getAssociatedProductsList"/> - <set field="responseName" value="products"/> - <set field="dependentKeyName" value="productId"/> - <set field="descName" value="internalName"/> - <set field="selectedDependentOption" from-field="parameters.productId" default-value="_none_"/> </actions> <widgets> <platform-specific><html><html-template location="component://common/webcommon/includes/setCountryStatesEventJs.ftl"/></html></platform-specific> |
Free forum by Nabble | Edit this page |