Метод onEntityInitialized очевидно не работает в схемах секции, я подразумеваю что для них существует специфический метод-аналог, но беглым поиском по исходникам однозначной информации полцчить не удалось.
Метод "init" отрабатывает когда карточка еще не инициализирована, в частности детали на странице, мне же требуется взаимодействие с ними, в коде карточки в методе onEntityInitialized - отлично отрабатывает моя логика, но вот в секции - аналогичный трюк "не проходит", точка останова внутри onEntityInitialized вообще не передается на исполнение.
Нравится
Просто в странице в методе init описан onEntityInitialized, а в разделе - нет. Как вариант можно заместить базовую схему страницы и написать что-то своё:
[javascript]
init: function(callback, scope) {
var performanceManagerLabel = "";
if (scope && scope.hasOwnProperty("sandbox")) {
performanceManagerLabel = scope.sandbox.id;
} else if (this && this.hasOwnProperty("sandbox")) {
performanceManagerLabel = this.sandbox.id;
}
performanceManager.start(performanceManagerLabel + "_Init");
this.callParent([function() {
Terrasoft.chain(
this.checkAvailability,
this.initViewModelValuesFromSysSettings,
this.initActiveViewSettingsProfile,
this.initData,
this.initLeftSectionContainerSize,
function(next) {
this.canUseWizard(function(result) {
this.set("CanUseWizard", result);
}, this);
this.checkCanManageAnalytics();
this.initSectionFiltersCollection();
this.initSortActionItems();
this.initDataViews();
this.initActionButtonMenu("Separate", this.getSectionActions());
this.initSectionViewOptionsButtonMenu(this.getViewOptions());
this.initDcmActionsDashboardVisibility(function() {
this.initCanUseDcmDesigner();
}, this);
this.initEditPages();
this.initCardContainer();
this.initContextHelp();
this.initAddRecordButtonParameters();
this.initFolders();
this.initRowCount();
this.initIsPageable();
this.initIsActionButtonsContainerVisible();
this.initUpdateAction();
this.initResetAction();
this.subscribeInitFilterFromStorage();
this.initActionsButtonHeaderMenuItemCaption();
this.subscribeSandboxEvents();
this.mixins.GridUtilities.init.call(this);
this.subscribeIsCardVisibleChange();
this.subscribeGetRunProcessesProperties();
this.initRunProcessButtonMenu(false);
this.subscribeCanShowTags();
this.initActionsButtonCaption();
this.subscibeOnMultiSelectChange();
this.subscibeOnSelectedRowsChange();
this.initTags(this.entitySchemaName);
this.initSectionHeaderContainerVisibility();
next();
},
function(next) {
this.onSectionInitialized();
next();
},
function() {
performanceManager.stop(performanceManagerLabel + "_Init");
performanceManager.start(performanceManagerLabel + "_BeforeRender");
callback.call(scope);
}, this);
this.initHelpUrl(this.Terrasoft.emptyFn, this);
this.initPrintButtonsMenu(this.Terrasoft.emptyFn, this);
}, this]);
},
onSectionInitialized: function() {
debugger;
}
[/javascript]
Но работать будет немного криво (пр.: у меня при остановке на дебагере в "GridData" валяется пустая коллекция. Инициализируется она, видимо, позже). Посмотрите, может вам подойдёт.