|
Author: jleroux
Date: Fri May 8 07:53:39 2015 New Revision: 1678294 URL: http://svn.apache.org/r1678294 Log: Fixes "When used setDependentDropdownValuesJs.ftl precludes focus-field-name" https://issues.apache.org/jira/browse/OFBIZ-6346 with examples in FormWidgetExampleForms.xml and for NewCustomer screen Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml ofbiz/trunk/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=1678294&r1=1678293&r2=1678294&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Fri May 8 07:53:39 2015 @@ -717,6 +717,7 @@ under the License. <set field="dependentKeyName" value="geoId"/> <set field="descName" value="geoName"/> <set field="selectedDependentOption" value="_none_"/> + <set field="focusFieldName" value="NewUser_USER_PARTY_ID"/> </actions> <widgets> <platform-specific><html><html-template location="component://common/webcommon/includes/setDependentDropdownValuesJs.ftl"/></html></platform-specific> Modified: ofbiz/trunk/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl?rev=1678294&r1=1678293&r2=1678294&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl Fri May 8 07:53:39 2015 @@ -19,10 +19,13 @@ under the License. <script type="text/javascript"> jQuery(document).ready(function() { if (jQuery('#${dependentForm}').length) { - jQuery("#${dependentForm}_${mainId}").change(function(e, data) { + jQuery('#${dependentForm}_${mainId}').change(function(e, data) { getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentKeyName}', '${descName}'); }); getDependentDropdownValues('${requestName}', '${paramKey}', '${dependentForm}_${mainId}', '${dependentForm}_${dependentId}', '${responseName}', '${dependentKeyName}', '${descName}', '${selectedDependentOption}'); + <#if (focusFieldName??)> + jQuery('#${focusFieldName}').focus(); + </#if> } }) -</script> \ No newline at end of file +</script> Modified: ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml?rev=1678294&r1=1678293&r2=1678294&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml (original) +++ ofbiz/trunk/specialpurpose/example/widget/example/FormWidgetExampleScreens.xml Fri May 8 07:53:39 2015 @@ -58,7 +58,7 @@ under the License. if you need an example with more than one dropdown in a form have a look at EditProductPriceRules screen in PriceScreens.xml--> <set field="dependentForm" value="DropDownFieldsExampleForm"/> - <set field="paramKey" value="countryGeoId"/> + <set field="paramKey" value="countryGeoId"/> <set field="mainId" value="countryGeoId"/> <set field="dependentId" value="stateProvinceGeoId"/> <set field="requestName" value="getAssociatedStateList"/> @@ -66,13 +66,14 @@ under the License. <set field="dependentKeyName" value="geoId"/> <set field="descName" value="geoName"/> <set field="selectedDependentOption" from-field="postalAddress.stateProvinceGeoId" default-value="_none_"/><!-- postalAddress.stateProvinceGeoId does not make much sense here, only to get the idea --> + <set field="focusFieldName" value="DateTimeFieldsExampleForm_field1_i18n"/> <!-- asmslect parameters, must be prefixed by asm_ for setMultipleSelectJs.ftl --> <set field="asm_multipleSelectForm" value="DropDownMultipleFieldExampleForm"/> <set field="asm_multipleSelect" value="DropDownMultipleFieldExampleForm_countryGeoIdMultiple"/> <set field="asm_formSize" value="600"/> <set field="asm_asmListItemPercentOfForm" value="95"/> - <set field="asm_sortable" value="false"/> + <set field="asm_sortable" value="false"/> </actions> <widgets> <platform-specific><html><html-template location="component://common/webcommon/includes/setDependentDropdownValuesJs.ftl"/></html></platform-specific> |
| Free forum by Nabble | Edit this page |
