Hi, I'm using Smartclient v12.1p_2023-08-16/Pro. I have a problem that when I want the text to change dynamically in tabs, nothing happens, although other elements translate well into the selected language. I also tried to do it through setTitle and this option, but it did not help
this.tabs[0].title = currentMessages.asset;
this.tabs[1].title = currentMessages.attachments;
This is my code :
initWidget: function () {
let self = this;
this.tabs = [
{
title: currentMessages.asset,
name: "equipmentsTab",
width: "50%",
direction: "ascending",
iconSize: 8,
iconAlign: "right",
iconOrientation: "right",
pane: isc.VLayout.create({
width: "100%",
members: [
self.createEquipmentSearchForm(),
isc.EquipmentListGrid.create({ leaveScrollbarGap: false }),
],
}),
click() {
if (self.toSort) {
this.pane.members[1].sortRecords("title", this.direction);
let isAsc = this.direction === "ascending";
this.direction = isAsc ? "descending" : "ascending";
this.setIcon(
isAsc
? "[SKINIMG]ListGrid/sort_descending.png"
: "[SKINIMG]ListGrid/sort_ascending.png",
);
this.redraw();
} else {
self.toSort = true;
}
equipmentListGrid.getSelectedRecord().attachmentCount =
equipmentTabSet.getTab(1).pane.members[0].data.localData ? equipmentTabSet.getTab(1).pane.members[0].data.localData.length : equipmentTabSet.getTab(1).pane.members[0].data.length;
equipmentListGrid.redraw();
},
},
{
title: currentMessages.attachments,
width: "50%",
disabled: true,
name: "attachments",
pane: isc.PhotoLayout.create({ type: "Equipment" }),
tabSelected: function (tabSet, tabNum, tabPane, ID, tab, name) {
self.toSort = false;
let photoGrid = tabPane.getMembers()[0];
let listGrid = tabSet.getTab(0).pane.members[1];
tabSet.getTab(0).setDisabled(false);
photoGrid.setData([]);
if (listGrid.anySelected()) {
let selectedRecord = listGrid.getSelectedRecord();
tabPane.selectedRecord = selectedRecord;
photoGrid.fetchData({
objectType: selectedRecord.objectType,
id: selectedRecord.id,
fileType: ["PHOTO", "DOCUMENT", "THERMAL"],
});
}
},
},
];
this.Super("initWidget", arguments);
},
Comment