From Scott's remark, removes dependency from Product component in dependent dropdowns example

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@987266 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2010-08-19 18:49:32 +00:00
parent 6e2431837e
commit e3ee5b8035
2 changed files with 9 additions and 21 deletions
@@ -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 -->
@@ -53,20 +53,16 @@ under the License.
</container>
<section>
<actions>
<!-- fields for the form where dependent dropdowns are-->
<set field="dependentForm" value="DropDownFieldsExampleForm"/>
<!-- fields for setCountryStatesEventJs -->
<set field="selectedStateProvinceGeoId" from-field="postalAddress.stateProvinceGeoId" default-value="_none_"/><!-- postalAddress.stateProvinceGeoId does not make much sense here, only to get the idea -->
<!-- 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="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_"/>
<set field="dependentForm" value="DropDownFieldsExampleForm"/>
<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 -->
</actions>
<widgets>
<platform-specific><html><html-template location="component://common/webcommon/includes/setCountryStatesEventJs.ftl"/></html></platform-specific>