Skip to Content

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

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>");

}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers