Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-5125

No states displayed for default country in New Shipping Address for order

    XMLWordPrintableJSON

Details

    Description

      On the demo site, go to https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderview?orderId=WSCO10001 and click on New Shipping Address. No states are displayed for the default country, USA. Once you choose a country, states are displayed properly.

      Have a look at the pattern used elsewhere in OFBiz in framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl (https://fisheye6.atlassian.com/browse/ofbiz/trunk/framework/common/webcommon/includes/setDependentDropdownValuesJs.ftl). A change event calls a function, in this case getDependentDropdownValues, and there's a call to the function to set an initial value for the dependent value based on the default value of the source data.

      Compare the code in https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/order/webapp/ordermgr/images/js/OrderShippingInfo.js, which sets up the change event but does not set a default value. The patch includes a call to getAssociatedStateList to fix the problem.

      Attachments

        1. OFBIZ-5125_initial_state_list
          0.7 kB
          Paul Foxworthy

        Issue Links

          Activity

            People

              paulfoxworthy Paul Foxworthy
              paulfoxworthy Paul Foxworthy
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: