Skip to Content
0
May 17, 2018 at 11:13 AM

How to attach press event for a custom control (Renderer function)

252 Views

Hi,

I am developing a custom control from scratch. My custom control contains One text field at the top and three buttons at the bottom. These controls are not added as an aggregation. So everytime when my custom control loads, these child controls will load at runtime(from render function). I added text field and three buttons as HTML elements in Render function. My doubt is how to attach event for each control below.

Code:

renderer : function(oRm, oControl){

oRm.write("<input>");

oRm.write("<BR>");

oRm.write("<button onclick>");

oRm.writeEscaped("Button1");

oRm.write("</button>");

oRm.write("<button>");

oRm.writeEscaped("Button 2");

oRm.write("</button>");

oRm.write("<button>");

oRm.writeEscaped("Button 3");

oRm.write("</button>");

}