Skip to Content
avatar image
Former Member

How to consume new control

HI

I want to consume new ui5 control which I created in the WebIDE,

The new created control is in done like following in js File under IDEplatform package with name TestNewControl.js

sap.ui.define(["sap/ui/core/Control"],

    function(coreControl) {

        debugger;

        return coreControll.extend("myControl", {

            metadata: {

.....

:

Now I want to consume it from different package/layer/plugin in the web IDE lets say for example platform but any other package that are not related to my plugin, like saptoolset which is

I try tp consume this control on different module

define(["sap.watt.ideplatform.plugin.test.controls.TestNewControl"]);

sap.ui.jsfragment("sap.watt.saptoolsets.fiori.test.plugin.test1.view.Ui", {

//And then I call to the new control like

var aa = new sap.watt.ideplatform.plugin.test.controls.TestNewControl({

            labelView: oLabelView,

            textView: oTextView

        });

but this is not working,I got error and it seems that the new control is not knowen on diffrent package layer,

How it can be done?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 30, 2015 at 11:56 AM

    Insert your package/layer/plugin file to your project.

    use <script> or sap.ui.resources("PATH ").

    If your controls are registered in your project branch. you can able to reuse the class, else it will throw undefined error.

    Thanks,

    KA

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Karthik Arjun

      HI Ka,

      Sorry but I cannot since this is related to the webIDE and not on creating a new UI controll.

      What I need is just to create new UI5 control (extend vary simple control any control will be good) and consume if from different layer

      For example if I create it under  Ideplatfrom  and I want to consume it on saptollsets,how?

      Thanks is advance!

      Joerg