Read and update widget properties
Functions covered
Composition structure
Composition script
Last updated
Last updated
(function() {
return {
init: function(comp, context) {
// get reference to the title widget
const wiLowerTitle = comp.findWidget("lowerTitle")[0];
// get widget properties
const p = wiLowerTitle.getPayload();
console.log(p);
// get title text
const titleText = p.text;
// change title to uppercase
wiLowerTitle.setPayload({
"text": titleText.toUpperCase()
});
},
close: function(comp, context) {}
};
})();