cancel
Showing results for 
Search instead for 
Did you mean: 

Collection Browser Widget won´t show any items

Former Member
0 Kudos

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"
       widgetDefinitionId="com.hybris.cockpitng.collectionBrowser"
       slotId="dashboardWidgets">
     <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>
     <virtual-sockets>
         <output id="reset" type="java.util.Map" visibility="external"/>
     </virtual-sockets>
 </widget>

And this is in my config.xml:

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

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

Any help is appreciated.

Kind regards, Marten

former_member620692
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (0)