Skip to Content
author's profile photo Former Member
Former Member

Collection Browser Widget won´t show any items

Hi Experts,

i want to display a self defined item type in a collection browser widget but can´t get it to work. Even trying with types like Product did not work. (I can see multiple items of each type in the backoffice under System - Types also displayed in a collection browser but i can´t replicate it in my own extension).

The collection browser itself is visible where i want it to be so can someone please explain to me what i did wrong or what i am missing?

In this example it should display Products.

This is in my widgets.xml:

 <widget id="myCollectionBrowser"
     <setting key="listSubtitle" type="String"></setting>
     <setting key="socketDataType_$T" type="String">java.lang.Object</setting>
     <setting key="widgetStyleAttribute" type="String"></setting>
     <setting key="pageSize" type="Integer">10</setting>
     <setting key="maxCharsInCell" type="Integer">70</setting>
     <setting key="actionSlotComponentId" type="String">mylistviewactions</setting>
     <setting key="multiSelect" type="Boolean">false</setting>
     <setting key="colConfigCtxCode" type="String">listview</setting>
     <setting key="listTitle" type="String"></setting>
     <setting key="itemRenderer" type="String">listViewRenderer</setting>
     <setting key="sortableListHeader" type="Boolean">true</setting>
     <setting key="widgetStyleClass" type="String"></setting>
     <setting key="asyncLoading" type="Boolean">false</setting>
     <setting key="collectionBrowserConfigCtx" type="String">myCollectionBrowser</setting>
         <output id="reset" type="java.util.Map" visibility="external"/>

And this is in my config.xml:

 <context component="myCollectionBrowser" type="Product">
             <cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>

 <context type="Product" component="mylistviewactions">
         <y:group qualifier="common">
             <y:action action-id="com.hybris.cockpitng.action.create" property="pageable.typeCode"/>

Any help is appreciated.

Kind regards, Marten

Add a comment
10|10000 characters needed characters exceeded

  • Did you check if it's working with OOTB (Out Of The Box) reference i.e. <context type="Product" component="collection-browser" ...>?

  • Former Member Arvind Kumar Avinash

    I checked and it didn´t change.

    And as far as i know the String in component is just the name for the config context that you reference from the widget setting "collectionBrowserConfigCtx" which defaults to "collection-browser" if not set.

    Also if i add another mold strategy to my config context i can switch between the two molds in my collection browser in backoffice, so i am quite sure it uses my config.

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.