function controllerExample(node,idx)
{
    this.node = node;
    this.idx = idx;
    this.clickCount = 0;

    this.setEventHandlers();
}
controllerExample.prototype.setEventHandlers = function()
{
    $(this.node).find('input').bind('click',this.routeEvent(this.handleClick));
}
controllerExample.prototype.handleClick = function(event)
{
    this.clickCount++;
    $(this.node).find('p').text('Button is clicked '+this.clickCount+' time(s)');
}
controllerExample.prototype.routeEvent = function(eventHandler)
{
    var _scope = this;
    return function(event) {
        return eventHandler.call(_scope,event);
    }
}
