2
votes

I've created a custom control where I have 5 properties and render a graph based on them like so:

renderer : function(manager, myControl) {
    manager.write("<div>");
    manager.write("Some html stuff");
    manager.write("</div>");
}

here everything works fine and render the graph with my pre selected model data. The problem comes when I try to change some of the proparties at runtime. In the method rerender the code is triggered when some of the properties are changed but the rendering is not applied. The method itself is identical, just the manager is instanciated.

rerender : function() {
    console.log("trigger");
    var manager = new sap.ui.core.RenderManager();
    manager.write("<div>");
    manager.write("Some html stuff");
    manager.write("</div>");
}

I also tried to create a global object manager and make both managers in above to be the same thing. The result was the same...

1

1 Answers

2
votes

You have to add oRm.writeControlData(oControl); to the renderer

In your case

renderer : function(manager, myControl) {
    manager.write("<div");
    manager.writeControlData(myControl);
    manager.write(">");
    manager.write("Some html stuff");
    manager.write("</div>");
}

Go through API reference: sap/ui/core/RenderManager