on 03-17-2006 2:18 PM
Hello,
I have a value node with a selection property of 0..n
in my context.
Because of this it's possible to have a multi-select.
But I don't know how to get all selected items
in my Source Code.
For a single selection I know this statement:
wdThis.wdGetContext().nodeSelectionPersons().getLeadSelection();
But how can I get all selections in a multi-selection.
Patrick
Patrick,
Try this code snippet. It should be self-explanatory.
final IWDNode node
= wdContext().nodeSelectionPersons();
final int lead = node.getLeadSelection();
for (int i = 0, count = node.size(); i < count; i++)
{
if ( i == lead || <b>node.isMultiSelected(i)</b> )
{
wdComponentAPI.getMessageManager().reportSuccess
(
"Element is selcted (lead or multi): " + i
)
}
}
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.