问题
Using SSJS I have a handle to a NotesXSPViewEntry which is a category in view,now I need to get the parent category from that entry as a NotesViewEntry, so I tried to use NotesXSPViewEntry.getParent() but that returns a notesViewNavigator instead of a NotesViewEntry.
How do I get the parent NotesViewEntry from the notesXSPViewEntry? or how do I convert a notesXSPViewEntry to a NotesViewEntry?
回答1:
One solution: get the position with getNavigatorPosition()
. The get the NotesViewNavigator with getParent(), call gotoPos()
with that position as parameter, then getPrev()
should return the previous entry and getParent()
the parent entry.
You might be able to leave the gotoPos() call out: getParent().getCurrent().getParent()
should return XSPViewEntry's navigator's current entry's parent entry.
来源:https://stackoverflow.com/questions/20376018/how-do-i-get-the-parent-notesviewentry-from-the-notesxspviewentry