-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 6.2.X EE, 7.0.1 CE GA2
-
Fix Version/s: 6.2.X EE, 7.0.1 CE GA2
-
Component/s: JS APIs and Utilities, ~ [Archived] Frontend Infrastructure
-
Branch Version/s:6.2.x
-
Backported to Branch:Committed
-
Story Points:1.25
-
Fix Priority:3
-
Git Pull Request:
Steps to reproduce:
Modify modules/apps/foundation/users-admin/users-admin-web/src/main/resources/META-INF/resources/organization/details.jsp so each of the elements in Liferay.DynamicSelect has the selectNullable attribute set to false:
new Liferay.DynamicSelect( [ { select: '<portlet:namespace />countryId', selectData: Liferay.Address.getCountries, selectDesc: 'nameCurrentValue', selectId: 'countryId', selectNullable: false, selectSort: '<%= true %>', selectVal: '<%= countryId %>' }, { select: '<portlet:namespace />regionId', selectData: Liferay.Address.getRegions, selectDesc: 'name', selectId: 'regionId', selectNullable: false, selectVal: '<%= regionId %>' } ] );
After deploying the module, the expected behavior is that when you create an Organization, there isn't any blank option for Country. Actual behavior is that there is always a blank option for Country.
Root cause analysis:
In dynamic_select.js, we see the following:
var selectNullable = options.selectNullable || true;
This cannot ever evaluate to false. This results in a situation where Liferay.DynamicSelect always forces a null entry in the drop-down select menu.
- relates
-
LPE-15832 Cannot disable selectNullable in Liferay.DynamicSelect
-
- Closed
-