ContextMenu - Change item caption

Hi,
I am using the ContextMenu addon and need to rename existing menu items. It appears the ContextMenuItem class does not allow to change the caption after the item instance has been created. In our application we can switch the application locale on the fly and this would mean recreating all the context menu items to have them show the new caption.
Am I missing something? Or could this be added in a future release of the addon?

Hi,

you’re right, the caption can not be changed afterwards. The feature would be quite simple I think so the fastest way to get it in would probably be to check out the code (
https://bitbucket.org/peterl1084/vaadin-7-contextmenu-4
), implement it yourself and send a pull request to the author. Alternatively you could report the issue in the forum thread dedicated to the addon (
https://vaadin.com/forum#!/thread/119996
).