fixed event bug

events now binded during the layout's onRender method so that they can persist when the parts of the layout are opened and closed