I have a case, I want to make two or more buttons on a page.
I've create it, but only one button appears, the second button doesn't appear.
When I refresh the page, a second button appears. Below screenshoot and the code that I use to make these 2 buttons.
Source code in section:
define("UsrExampleBtn1Section", [], function() {
return {
entitySchemaName: "UsrExampleBtn",
methods: {
onClickTest1: function() {
console.log("Test 1 Button Clicked..");
},
onClickTest2: function() {
console.log("Test 2 Button Clicked..");
},
},
diff: /**SCHEMA_DIFF*/[
/**
* Element Test Button 1
*/
{
"operation": "insert",
"parentName": "CombinedModeActionButtonsCardLeftContainer",
"propertyName": "items",
"name": "Test1Btn",
"values": {
itemType: Terrasoft.ViewItemType.BUTTON,
caption: {
bindTo: "Resources.Strings.TestBtn1Caption"
},
click: {
bindTo: "onClickTest1"
},
"style": Terrasoft.controls.ButtonEnums.style.BLUE,
}
},
/**
* Element Test Button 2
*/
{
"operation": "insert",
"parentName": "CombinedModeActionButtonsCardLeftContainer",
"propertyName": "items",
"name": "Test2Btn",
"values": {
itemType: Terrasoft.ViewItemType.BUTTON,
caption: {
bindTo: "Resources.Strings.TestBtn2Caption"
},
click: {
bindTo: "onClickTest2"
},
"style": Terrasoft.controls.ButtonEnums.style.GREEN
}
},
]/**SCHEMA_DIFF*/,
details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,
};
});
Source code in page:
define("UsrExampleBtn1Page", [], function() {
return {
entitySchemaName: "UsrExampleBtn",
methods: {
onClickTest1: function() {
console.log("Clicked Test Button 1");
},
onClickTest2: function() {
console.log("Clicked Test Button 2");
},
},
diff: /**SCHEMA_DIFF*/[
/**
* Element Test Button 1
*/
{
"operation": "insert",
"parentName": "LeftContainer",
"propertyName": "items",
"name": "Test1Btn",
"values": {
itemType: Terrasoft.ViewItemType.BUTTON,
caption: {
bindTo: "Resources.Strings.TestBtn1Caption"
},
click: {
bindTo: "onClickTest1"
},
"style": Terrasoft.controls.ButtonEnums.style.BLUE
}
},
/**
* Element Test Button 2
*/
{
"operation": "insert",
"parentName": "LeftContainer",
"propertyName": "items",
"name": "Test2Btn",
"values": {
itemType: Terrasoft.ViewItemType.BUTTON,
caption: {
bindTo: "Resources.Strings.TestBtn2Caption"
},
click: {
bindTo: "onClickTest2"
},
"style": Terrasoft.controls.ButtonEnums.style.GREEN
}
},
]/**SCHEMA_DIFF*/,
};
});
Is there something wrong in my code? I have checked the console, but there is no error. any solution for my case? Thanks
*SOLVED
Add all button caption in section and page