Skip to content

Commit

Permalink
read tags as string[].
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Jun 5, 2021
1 parent f508671 commit f7be677
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import static design.aem.utils.components.I18nUtil.getDefaultLabelIfEmpty;
import static design.aem.utils.components.ImagesUtil.*;
import static design.aem.utils.components.ResolverUtil.mappedUrl;
import static design.aem.utils.components.TagUtil.getTagIds;
import static design.aem.utils.components.TagUtil.getTagsAsAdmin;
import static design.aem.utils.components.TenantUtil.resolveTenantIdFromPath;
import static java.text.MessageFormat.format;
Expand Down Expand Up @@ -174,7 +175,7 @@ protected void setFields() {

@Override
protected void setFieldDefaults() {
componentDefaults.put(TagConstants.PN_TAGS, getResourcePage().getTags());
componentDefaults.put(TagConstants.PN_TAGS, getTagIds(getResourcePage().getTags()));
componentDefaults.put(FIELD_DESCRIPTION, getResourcePage().getDescription());
componentDefaults.put(FIELD_TITLE, getPageTitle(getResourcePage(), getResource()));

Expand Down Expand Up @@ -276,7 +277,7 @@ protected void processCommonFields() {
//get legacy badge configs from tags
String legacyBadgeConfigTags = componentProperties.get(FIELD_LEGACY_BADGE_CONFIG_TAGS, StringUtils.EMPTY);
if (isNotEmpty(legacyBadgeConfigTags)) {
Map<String, Map> legacyBadgeConfig = getTagsAsAdmin(
LinkedHashMap<String, Map<String, String>> legacyBadgeConfig = getTagsAsAdmin(
getSlingScriptHelper(),
new String[]{legacyBadgeConfigTags},
getRequest().getLocale(),
Expand Down

0 comments on commit f7be677

Please sign in to comment.