For this to work you need 4 things:
- You need to declare the property "componentName" in contribution.xml - type String
- You need to write the getter/setter in component.js as shown above.
- You need to write the getter in contribution.ztl, e.g.
String getComponentName() {* return this.componentName; *} - Whenever there is a new value on the browser, in your component.js you need to call this.firePropertiesChanged(["componentName"]);