SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

Using setModel on sap.m.table.columnmenu.Menu throws exception #4088

Closed seiupo closed 1 month ago

seiupo commented 1 month ago

OpenUI5 version: 1.120.0

Browser/version (+device/version): Chrome 126.0.6478.127, MacBook Pro M3 Max

Any other tested browsers/devices(OK/FAIL): -

URL (minimal example if possible): https://run.plnkr.co/plunks/hTUoHOABBw7osHpH/

User/password (if required and possible - do not post any confidential information here): -

Steps to reproduce the problem:

  1. Create a sap.m.table.columnmenu.Menu (including ActionItems)
  2. At least one of the contained ActionItems should have at least one property binded to a JSONModel (e.g.: visible property)
  3. After creation, use setModel on the Menu object with the JSONModel from 2.

What is the expected result? No error is raised; the visibile property is correctly binded to the property of the JSONModel.

What happens instead? An error is raised saying: "Cannot read properties of undefined (reading '_getNavigationList')".

Any other information? (attach screenshot if possible) Not so much as an information, but a question: in SAPUI5 1.117 old way of working with column menus was made obsolete. This new column menu implementation is based on an association that we can't model in an XMLView. Any plans to change this? It is quite cumbersome to work with the new column menu implementation.

GerganaKremenska commented 1 month ago

Hello @seiupo,

Please provide a minimal example, as the current one does not work.

Best Regards, Gergana

seiupo commented 1 month ago

Hi Gergana,

The example works as it was intended :-). If you check the console (after opening the link), you will be able to see the error that I get when I try to use setModel with the column menu. The error from the console is the reason I opened this issue.

Have a good one! Sergiu

codeworrior commented 1 month ago

From looking at the sample, I would assume that the same issue occurs when setVisible is called on any item before the column menu is opened (even w/o data binding).

TeodorTaushanov commented 1 month ago

Code https://plnkr.co/edit/hTUoHOABBw7osHpH?preview

TeodorTaushanov commented 1 month ago

Hello @seiupo,

Thank you for sharing this finding. I've created an internal incident DINC0208229. The status of the issue will be updated here in GitHub.

Regards, Teo

seiupo commented 1 month ago

Hello @seiupo,

Thank you for sharing this finding. I've created an internal incident DINC0208229. The status of the issue will be updated here in GitHub.

Regards, Teo

Ok, thank you too! Have a good one!

stoyanovski commented 1 month ago

Hello @seiupo

Thanks for reporting this issue. It is now fixed and will be available in patch version 1.120.19.

Best regards, Oliver