First of all you most likely want toBeRenderer=false. Are you doing this
at runtime or when starting up?
Am 27.09.12 11:12, schrieb Mike Shreek:
> Hi, I've been using this code.
> MMenuElement designMenu =
> But nothing happens. No Error.
> Am I missing something important here?
I think this a problem in the Menu-Renderers I've already explained in
another answer. I gues the only possible solution is to attach
visible-when expression (i hope this one gets respected by the renderer).
The current menu code is extremely complex because the backwards stuff
got in there as well so fixing it your own is probably not very easy,
the best thing I could propose is that you write your custom menu
renderer (those are generally the easiest ones :-)
Am 27.09.12 12:26, schrieb Mike Shreek:
> Hi Thomas!
> I have tried what you said and still get the same result..
> And I am doing this at runtime. I wanted to control the menu. The first
> approach was to add and delete menus. But I thought that I could just
> set the visibility whenever users trigger events.
Not sure there's documentation around and I'm out now for j1 so I can't
write up on it. You can take a look at the sources to see how things are
done - I have written a completely new rendering engine in the last
weeks but that one is for JavaFX so it won't help you.
Am 27.09.12 15:07, schrieb Mike Shreek:
> Thomas, If you could pinpoint me on how to create my own custom menu
> renderer please. It would really help me with my quest
I have code which removes some menu and toolbar elements in the @ProcessRemovals of the life cycle manager based on configurable user rights (named "kompetenz" which is german for "authority"). If a user doesn't have the authority (kompetenz) for a specific command, all MUIElements that referenced by this command are set "not to be rendered".