Skip to content

Commit

Permalink
LPS-123484 Set assetCategoryIds in DefaultLayoutListRetrieverContext
Browse files Browse the repository at this point in the history
LPS-123484 WIP - Display select element
  • Loading branch information
ruben-pulido authored and brianchandotcom committed Nov 26, 2020
1 parent f2cf194 commit da2f25f
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -156,6 +156,8 @@ public List<Object> getCollection(
DefaultLayoutListRetrieverContext defaultLayoutListRetrieverContext =
new DefaultLayoutListRetrieverContext();

defaultLayoutListRetrieverContext.setAssetCategoryIdsOptional(
_getAssetCategoryIds());
defaultLayoutListRetrieverContext.setSegmentsExperienceIdsOptional(
_getSegmentsExperienceIds());
defaultLayoutListRetrieverContext.setPagination(
Expand Down Expand Up @@ -768,6 +770,17 @@ public String getStyleFromStyleBookEntry(String styleValue)
return "var(--" + cssVariable + ")";
}

private long[] _getAssetCategoryIds() {
if (_assetCategoryIds != null) {
return _assetCategoryIds;
}

_assetCategoryIds = GetterUtil.getLongValues(
_httpServletRequest.getAttribute("ASSET_CATEGORY_IDS"));

return _assetCategoryIds;
}

private String _getBackgroundImage(JSONObject rowConfigJSONObject)
throws Exception {

Expand Down Expand Up @@ -1156,6 +1169,7 @@ private long[] _getSegmentsExperienceIds() {
private static final Log _log = LogFactoryUtil.getLog(
RenderLayoutStructureDisplayContext.class);

private long[] _assetCategoryIds;
private final Map<String, Object> _fieldValues;
private final FrontendTokenDefinitionRegistry
_frontendTokenDefinitionRegistry;
Expand Down

0 comments on commit da2f25f

Please sign in to comment.