From a79227f9a114337553ba516c36ed4b490dbd0d91 Mon Sep 17 00:00:00 2001 From: EmilVM Date: Tue, 10 Feb 2026 17:28:48 +0100 Subject: [PATCH] fix(ui): fixed issue with active technologies binding + minor UI5 errors Includes a fix to active technologies binding issue. Fixed by binding to SoftwareTechnology and filtering on activeVersion/ID. Also includes a few very small UI5 error fixes --- .../SoftwareSolutionObjectPage.controller.ts | 23 +++++++++++++++++++ app/solutioncentral/webapp/model/formatter.ts | 4 ++-- .../view/SoftwareSolutionObjectPage.view.xml | 2 +- .../ActiveTechnologiesTable.fragment.xml | 2 +- .../BusinessCasesInformation.fragment.xml | 2 +- .../view/fragments/HeaderInfo.fragment.xml | 4 ++-- 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/app/solutioncentral/webapp/controller/SoftwareSolutionObjectPage.controller.ts b/app/solutioncentral/webapp/controller/SoftwareSolutionObjectPage.controller.ts index a0bf342..e60bf06 100644 --- a/app/solutioncentral/webapp/controller/SoftwareSolutionObjectPage.controller.ts +++ b/app/solutioncentral/webapp/controller/SoftwareSolutionObjectPage.controller.ts @@ -199,6 +199,7 @@ export default class SoftwareSolutionObjectPage extends BaseController { ); this.filterVersionsTable(); + this.filterActiveTechnologiesTable(); this.filterBusinessCasesList(); const companyConfig = await this.getOwnerComponent().getCompanyConfiguration(); @@ -235,6 +236,28 @@ export default class SoftwareSolutionObjectPage extends BaseController { } else binding.refresh(); } + private filterActiveTechnologiesTable() { + const table = this.getView().byId( + TableKeys.ACTIVE_TECHNOLOGIES_TABLE_ID, + ) as Table; + const binding = table.getBinding("items") as ODataListBinding; + + const activeVersion_ID = this.getView() + .getBindingContext() + .getProperty("activeVersion/ID"); + + const filter = new Filter( + "softwareVersion_ID", + FilterOperator.EQ, + activeVersion_ID, + ); + + binding.filter(filter); + if (binding.isSuspended()) { + binding.resume(); + } else binding.refresh(); + } + private filterVersionsTable() { const table = this.getView().byId(TableKeys.VERSIONS_TABLE_ID) as Table; const binding = table.getBinding("items") as ODataListBinding; diff --git a/app/solutioncentral/webapp/model/formatter.ts b/app/solutioncentral/webapp/model/formatter.ts index 881d5f5..63416a1 100644 --- a/app/solutioncentral/webapp/model/formatter.ts +++ b/app/solutioncentral/webapp/model/formatter.ts @@ -96,9 +96,9 @@ export default { if (!object) return 0; if (table && table === TableKeys.ACTIVE_TECHNOLOGIES_TABLE_ID) { - return (object.technologies as Record[]).length; + return (object.technologies as Record[])?.length; } - return object.length as number; + return object?.length as number; }, }; diff --git a/app/solutioncentral/webapp/view/SoftwareSolutionObjectPage.view.xml b/app/solutioncentral/webapp/view/SoftwareSolutionObjectPage.view.xml index f2b1309..daf12c2 100644 --- a/app/solutioncentral/webapp/view/SoftwareSolutionObjectPage.view.xml +++ b/app/solutioncentral/webapp/view/SoftwareSolutionObjectPage.view.xml @@ -59,7 +59,7 @@ - + diff --git a/app/solutioncentral/webapp/view/fragments/ActiveTechnologiesTable.fragment.xml b/app/solutioncentral/webapp/view/fragments/ActiveTechnologiesTable.fragment.xml index b773e37..d3d1fea 100644 --- a/app/solutioncentral/webapp/view/fragments/ActiveTechnologiesTable.fragment.xml +++ b/app/solutioncentral/webapp/view/fragments/ActiveTechnologiesTable.fragment.xml @@ -11,7 +11,7 @@ mode="None" growing="true" backgroundDesign="Transparent" - items="{path: 'activeVersion/technologies', parameters: { $expand: 'softwareVersion'}}"> + items="{path: '/SoftwareTechnology', suspended: true, parameters: { $expand: 'softwareVersion'}}"> - + diff --git a/app/solutioncentral/webapp/view/fragments/HeaderInfo.fragment.xml b/app/solutioncentral/webapp/view/fragments/HeaderInfo.fragment.xml index 388c0b0..8bffe23 100644 --- a/app/solutioncentral/webapp/view/fragments/HeaderInfo.fragment.xml +++ b/app/solutioncentral/webapp/view/fragments/HeaderInfo.fragment.xml @@ -55,13 +55,13 @@