|<iterate> using multiple results [message #885042]
||Tue, 12 June 2012 06:36
| Seán Dunne
Registered: June 2012
So I am working on an application where we can select multiple different Objects.
I am trying to contribute a menu item based on the selection. So far I have the item appearing in the Context menu as I need I am having an issue getting the <enabledWhen> working correctly.
What I am trying to do is,
When one ObjectA and one ObjectB is selected enable the menu item.
The item should only be enabled when there is at least one of each of the objects in the selection and should not be enabled if there is another object type in the selection.
I hope I made my criteria understandable.
So far this is what I have atm, I have tried so many different approaches.
<instanceof value="org.xyz.Alpha" />
<instanceof value="org.xyz.Beta" />
This partially works, it does enable when I have a least one of each of ObjectA and ObjectB
but the problem is, it will also be enabled if I have only ObjectA in the selection and no ObjectB. Or if I have another object selected, say ObjectC and one of A or B selected.
Any help with this would be greatly appreciated.
And I would just like to say a big word of thanks to everyone on this forum that has contributed. This is my first post but I have used this forum for a long time when trying to figure out other stuff and the fact I haven't needed to post until now just shows how much info is already on here. So a big thanks to anyone that has asked and especially answered questions!!
Powered by FUDForum
. Page generated in 0.02149 seconds