on 11-27-2008 11:58 AM
Hello,
I have a context like:
Document (cardinality 1-1)
files (cardinality (0-n)
fileKeyWord (cardinality (0-n)
searchText (element)
I cannot get all searchText elements from the selected files element. If I get the currentFilesElement, I can have all atributes corresponding to the selected files node. But If I try to have the corresponding searchtext of the files element by calling in a for loop
wdContext.nodeFileKeyWord().getFileKeyWordElementAt(i).getSearchText(),
-> I have either all the searchtext elements from all files elements or nothing !!
Is there is a bug or I don't call the right function
Thanks
Quentin
Assuming your context structure is
Document (cardinality 1-1)
Files (cardinality 0-n)
FileKeyWord (cardinality 0-n, singleton=false)
searchText (attribute, string)
This should give you what you need:
IFilesElement file = wdContext.currentFilesElement();
for (int i = 0, n = file.nodeFileKeyWord().size(); i < n; ++i)
{
IFileKeyWordElement e = file.nodeFileKeyWord().getFileKeyWordElementAt(i);
String searchText = e.getSearchText();
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Armin, it is working now. I tried all the possibilities but this one is working.
By accessing the node from the corresponding element, I succeed to have my keywords
Quentin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the singleton property of the node.
Regards
Ayyapparaj
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 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.