If you don't want a submenu at all, just omit the submenu entirely rather than provide a submenu with empty data.
Announcement
Collapse
No announcement yet.
X
-
My problem is these menu data are dynamically hidden/added. So I don't really know at rendering time which menu items will be displayed. I've tried to set data to null but I get an NPE as soon as I try to click on the menu. I agree it is completely useless to have a submenu with no data but I'd rather have the submenu there and do nothing when the user clicks.
Perhaps I can hide the submenu instead of it does not have any data?
Comment
Comment