As Kishore already mentioned in this topic, and I have mentioned in the other topics, you should use a formatter function (or model binding).
In your template's content property, you do display both the text view as well as the button, but you either a) never bind its visible property to a model property, or b) set its visible property using a formatter function.