Skip to content

Commit cff228e

Browse files
LPD-49643 Reuse to single select
1 parent cf6006c commit cff228e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

modules/apps/dynamic-data-mapping/dynamic-data-mapping-form-field-type/src/main/java/com/liferay/dynamic/data/mapping/form/field/type/internal/select/SelectDDMFormFieldTemplateContextContributor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ public Map<String, Object> getParameters(
8181
ddmFormField.getProperty("localizedObjectField"));
8282
ObjectField objectField = _getObjectField(
8383
ddmFormField, ddmFormFieldRenderingContext);
84+
long objectFieldId = GetterUtil.getLong(
85+
ddmFormField.getProperty("objectFieldId"));
8486

8587
return HashMapBuilder.<String, Object>put(
8688
"alphabeticalOrder",
@@ -106,6 +108,11 @@ public Map<String, Object> getParameters(
106108
).put(
107109
"options",
108110
() -> {
111+
if (objectFieldId > 0) {
112+
return DDMFormFieldTemplateContextContributorUtil.
113+
getOptions(ddmFormField, _listTypeEntryLocalService);
114+
}
115+
109116
DDMFormFieldOptions ddmFormFieldOptions =
110117
ddmFormFieldOptionsFactory.create(
111118
ddmFormField, ddmFormFieldRenderingContext);

0 commit comments

Comments
 (0)