cancel
Showing results for 
Search instead for 
Did you mean: 

Error: failed to load 'sap/ui/core/ItemRenderer.js'

julian-s
Participant

Hello,

I'm trying to extend the standard sap.ui.core.Item control with some new behaviour. It will be used in the MultiComboBox later.

I have made a new DetailItem.js file in my project and entered the following code:

sap.ui.define([
	"sap/ui/core/Item"
], function (Item) {
	"use strict";

	return Item.extend("DetailItem", {
      metadata: {
          properties: {
            detailText: {type: "string", defaultValue: ""},
        }
      },

      renderer: { }
  });
});

Now when I call the control in the view with the namespace xmlns:ownControl="ch.ckw.zmmuamovw.controls"

Then in the aggregation of the MultiComboBox, it should now load my extended component:

<items>
        <ownControl:DetailItem key="{viewModel>key}" text="{viewModel>name}" detailText="test"/>
</items>

I try to achieve to access the property detailText in my extended logic, which actually should be possible.

Anyway I receive always the console log error:

Now what can I do, with this error, since I'm not able to create a custom control since the combo box requires an Item as children.

boghyon
Product and Topic Expert
Product and Topic Expert
0 Kudos

Core Items have no own renderer. Try replacing `renderer: {}` with `renderer: null` to avoid the error. By default, UI5 looks for a file with the "*Renderer" suffix which, in in your case, doesn't exist.

But what are you trying to achieve? Is showSecondaryValues= "true" not sufficient?

Accepted Solutions (0)

Answers (0)