I am going to set input's value to a text element when button is clicked? How can i do that?
define("ContactPageV2", [], function() {
return {
entitySchemaName: "Contact",
attributes: {},
modules: /**SCHEMA_MODULES*/{}/**SCHEMA_MODULES*/,
details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
businessRules: /**SCHEMA_BUSINESS_RULES*/{}/**SCHEMA_BUSINESS_RULES*/,
methods: {
onPageClick: function() {
var GreetingValue = this.get("SalutationType").value;
var GreetingDisplayValue = this.get("SalutationType").displayValue;
console.log(GreetingDisplayValue);
},
getMyButtonEnabled: function(){
return true;
}
},
dataModels: /**SCHEMA_DATA_MODELS*/{}/**SCHEMA_DATA_MODELS*/,
diff: /**SCHEMA_DIFF*/[
{
"operation": "insert",
"parentName": "ContactGeneralInfoBlock",
"propertyName": "items",
"name": "NewButton",
"values": {
itemType: Terrasoft.ViewItemType.BUTTON,
caption: {bindTo: "Resources.Strings.NewButtonCaption"},
click: {bindTo: "onPageClick"},
enabled: {bindTo: "getMyButtonEnabled"},
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
"layout": {
"column": 12,
"row": 2,
"colSpan": 8,
"rowSpan": 1
}
},
},
{
"operation": "insert",
"parentName": "ContactGeneralInfoBlock",
"propertyName": "items",
"name": "NewInput",
"values": {
itemType: Terrasoft.utils.inputBox,
caption: {bindTo: "Resources.Strings.NewButtonCaption"},
click: {bindTo: "onPageClick"},
enabled: {bindTo: "getMyButtonEnabled"},
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
"layout": {
"column": 6,
"row": 3,
"colSpan": 8,
"rowSpan": 1
}
},
}
]/**SCHEMA_DIFF*/
};
});