Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
seiupo opened this issue Jul 10, 2024 · 7 comments
Closed

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

seiupo opened this issue Jul 10, 2024 · 7 comments

Comments

@seiupo
Copy link

seiupo commented Jul 10, 2024

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
Copy link
Member

Hello @seiupo,

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

Best Regards,
Gergana

@seiupo
Copy link
Author

seiupo commented Jul 10, 2024

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
Copy link
Member

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
Copy link
Member

@TeodorTaushanov
Copy link
Member

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
Copy link
Author

seiupo commented Jul 11, 2024

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
Copy link
Contributor

Hello @seiupo

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

Best regards,
Oliver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants