on 2020 Oct 11 2:16 AM
Hi Expert,
i am adding facets in backoffice (PCM) view but facets values are displaying as an object. here is the code .
could you please let me know what i am missing here? instead of actual value object is getting displayed.
public class RCChannelTypeFacetDisplayProvider extends AbstractFacetValueDisplayNameProvider {
private static final Logger LOG = LoggerFactory.getLogger(RCChannelTypeFacetDisplayProvider.class);
private EnumerationService enumerationService;
private CommonI18NService commonI18NService;
public RCChannelTypeFacetDisplayProvider() {
}
@Override
public String getDisplayName(SearchQuery searchQuery, IndexedProperty indexedProperty, String facetValue) {
// Locale locale = this.getLocale(searchQuery.getLanguage());
final List<RCIcpCbpEnum> channelTypeEnums = getEnumerationService().getEnumerationValues(RCIcpCbpEnum.class);
final Optional<RCIcpCbpEnum> statusValue = channelTypeEnums.stream()
.filter(value -> value.getCode().equalsIgnoreCase(facetValue)).findAny();
if (statusValue.isPresent()) {
return getEnumerationService().getEnumerationName(RCPartTypeEnum.valueOf(facetValue.toUpperCase()));
}
return facetValue;
}
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.