Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Call default renderer in custom control

$
0
0

Hi there,

 

I'm trying to extend the sap.ui.commons.TextView.

I'm wondering if it's possible to call the default renderer first and then make some custom changes.

 

Here's a little code snippet to make clear what I want to do:

 

// Extend TextView
sap.ui.commons.TextView.extend("my.TextView", {    init: function() {        console.log('init');    },    renderer: {        render : function(oRenderManager, oControl) {            // 1. Call the default parent renderer of the Textview                        // 2. Add some custom css or whatever...            oRenderManager.addStyle('color','green');                    }    }
});

Somebody has a an idea if this is possible?

 

I've read through the guide here :SAPUI5 SDK - Demo Kit

But there I can only find an example how to override the original renderer, but not how to extend it...

 

Thanks,

ben


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>