Hello, how i can create dynamic options depending conditions, for example c

Hello, how i can create dynamic options depending conditions, for example custom menu according to role, maybe visible option for that?

Hi Freddy!

If you want to customize the menu according to the role of the current user, a good place to do that is when you are building the menu, just take into account the role and create each desired option.

If you want to change the menu items after the menu is created, just regenerate the list of items and call the method setMenuItems(items) with a new list of MenuItems to be displayed (from inside a Command of a given MenuItem) and it will change dynamically.

Please tell us if you have trouble by doing that.

Regards!

Thanks, works great