Details

Description

In Party Manager > Profile > Contact Information > Update the "Country" drop down always defaults to "United States".
This is misleading if the Country is not "United States".
If a user were to change some other address element he/she would have to also re-set "Country" to keep it from being changed to "United States".

To reproduce:
In Party Manager lookup a party with a "Postal Address" say "DemoSupplier"*
In Contact Information > Postal Address Click "Update"
In the Country field select any country but "United States" say Switzerland
Click "Save"

Activity

Patch is a work around.
In editcontactmech.ftl the inclusion of the Common Screen handling for Country drop down is removed and replaced with the logic form countries.ftl.
An alternative would be to add logic to the Common Screen however it is used throughout the code base and require a lot more testing.

Tom Burns
added a comment - 06/Apr/12 17:40 Patch is a work around.
In editcontactmech.ftl the inclusion of the Common Screen handling for Country drop down is removed and replaced with the logic form countries.ftl.
An alternative would be to add logic to the Common Screen however it is used throughout the code base and require a lot more testing.

I did not use your patch. 2 years ago I introduced setDependentDropdownValuesJs.ftl to handle Dependent Dropdowns. But I did not provide any examples of its uses in Freemarker templates.

In trunk at revision 1310953 I have committed a fix for the issue you reported using setDependentDropdownValuesJs.ftl.
Also in R11.04 at r1310955.

I would really appreciate if you could use the same and fix also the other EditContactMech.ftl (eCommerce and Facility). It will also a good opportunity for you to learn how to use it (it's quite simple actually see r1310953

Jacques Le Roux
added a comment - 08/Apr/12 06:27 Thanks for detailled report Tom,
I did not use your patch. 2 years ago I introduced setDependentDropdownValuesJs.ftl to handle Dependent Dropdowns. But I did not provide any examples of its uses in Freemarker templates.
In trunk at revision 1310953 I have committed a fix for the issue you reported using setDependentDropdownValuesJs.ftl.
Also in R11.04 at r1310955.
I would really appreciate if you could use the same and fix also the other EditContactMech.ftl (eCommerce and Facility). It will also a good opportunity for you to learn how to use it (it's quite simple actually see r1310953

Your patch is a hidden gem. The lack of context sensitivity in drop downs is a major OFBiz usability issue in my mind and the Country / State presentation is a poster child for the problem.
I'll open a new improvement issue for eCommerce and Facility since you have closed this one.

Tom Burns
added a comment - 08/Apr/12 16:08 I will create a new issue for "It's country..."
Your patch is a hidden gem. The lack of context sensitivity in drop downs is a major OFBiz usability issue in my mind and the Country / State presentation is a poster child for the problem.
I'll open a new improvement issue for eCommerce and Facility since you have closed this one.
Tom

Jacques Le Roux
added a comment - 08/Apr/12 17:53 Thank you for the compliment. Actually it's not that hidden. If you look at the examples: https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples#DropDownFieldsExampleForm_geoId_title
But I must say a clear example with Freemarker was missing indeed.
Looking forwar for eCommerce and Facility. A Jira for each would be better...