cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to show icon using LabelProvider

0 Likes
422

Hello Experts,

I want to show icon next to categories in PCM Backoffice. Can you please advise me how I can achieve it ? I created LabelProvider and implemented getIconPath(), but this method is never called (getLabel() is working fine).

My base configuration :

<context merge-by="type" parent="GenericItem" component="base" type="Category" module="custombackoffice" principal="backofficeproductmanagergroup,backofficeproductadministratorgroup">
        <y:base>
                <y:labels beanId="customCategoryLabelProvider"/>
        </y:base>
</context>

Basing on documentation (base Configuration - documentation) I was trying to configure fallbackToIcon and urlQualifier but it didn't work.

Thanks

Andrzej

Accepted Solutions (1)

Accepted Solutions (1)

pratik_a_soni
Participant

Hey Andrzej,

You can extend the DefaultMultiReferenceEditor to create your own and override the createReferenceLayout() method. You can create your own ReferenceEditorLayout so that you can get a control over createSelectedItemsListItemRenderer(). You can create your own ListItemRenderer which can render whatever you like it to do. You can also make use of OOTB method to render the most part and just add your custom changes.

You can use Component class method on the ListItem to fetch the required layout item.

Thanks

Pratik

Answers (0)