I have a question regarding dynamic menu items in a D2 4.1 Plugin I'm developing
so far, I can populate the item with multiple entries in them, depending on the config.
I have a context menu (defined in the MenucontextDelta.xml in my plugin) as shown below
<dynamic-menuitem id="mydynMenu" class="com.emc.btm.webfs.menu.dynamicmenus.MyMenu" />
<condition class="com.emc.d2fs.dctm.ui.conditions.interfaces.IsConnected" />
<condition class="com.emc.d2fs.dctm.ui.conditions.objects.IsQuery" equals="false" />
<condition class="com.emc.d2fs.dctm.ui.conditions.actions.CanView" />
<condition class="com.emc.d2fs.dctm.ui.conditions.typeparts.IsDocument" showifinvalid="true" />
<condition class="com.emc.d2fs.dctm.ui.conditions.objects.HasContent" showifinvalid="true" />
</dynamic-menuitem>
this has already some conditions which are global to all the menu entries I will add in my MyMenu class.
So far so good.
Now the question is that still in my class, when I create new menu entries (depending on values in a registered table), I need to apply different conditions on these new entries
XmlNode node = result.appendChildNode("menuitem");
node.setAttribute ("id", "myid");
node.setLabel ("label", "my label");
node.setAttribute ("action", "myAcvtion()");
Now, it comes.
How can I had a condition, using setAttibute ???? creating a child node ?
Any idea