-
Notifications
You must be signed in to change notification settings - Fork 743
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
DefaultMenuItem: Id gets overwritten #1039
Comments
This is not a bug but as designed. Use a |
Did you even try it with DynamicMenuModel? |
To make the problem clearer: if you set a String as the ID it gets still overwritten, because it needs an Integer later on: BaseMenuRenderer PF 5.3.5 jar protected MenuItem findMenuitem(List elements, String id) {
So why is it possible at all to set a String value as an ID? |
another Problem is, that it is not possible to see any Ids of the MenuItems in the jsf. So no JavaScript actions possible. Something is totally wrong with ids and menuItems |
I tried... and (by 'accident') used 'integers'... Lucky me... |
Bit by this again (using PF 6.1). Sure would be helpful if this could be fixed. I'm not off to code a work-around... |
I can post and explain my workaround tomorrow. it's not much effort. |
I posted and explained my workaround over here now: hope it helps |
So I am confused. I just read that whole stack overflow and this bug ticket and here is what I think I got out of it.
Couldn't the code be modified to check if a MenuItem had an ID already if it is doesn't then it would generate a unique one? |
But that's exacty what I did. I overwrote the MenuRenderer and explained how to do it. look at "Lule"s Code example |
So why not submit a PR if you have the issue fixed? |
how can I do this? |
aaah thank you. Will do that in the evening then. |
@LuleJayjay which evening? Your PR would be appreciated by me as well :) |
I just submitted a PR for this. It was quite an easy fix can @LuleJayjay @kukel please review. |
Fix #1039: DefaultMenuModel allow manually set Ids
in BaseMenuRenderer encodeEnd a UniqueId is being generated for every MenuElement of the MenuModel.
If an ID was set before, it gets overwritten.
The text was updated successfully, but these errors were encountered: