Looking into the source code I figured out this code that is working for me:
Code:
Destination destination = item.getDest();
if(destination == null){
// capture the action if no destination is found and point to the
// actions destination information
if (item.getAction() != null) {
Action action = item.getAction();
if (action instanceof GoToAction) {
destination = ((GoToAction) action).getDestination();
} else {
Library library = action.getLibrary();
Hashtable<Object,Object> entries = action.getEntries();
destination = new Destination(library, library.getObject(entries, "D"));
}
}
}
In the Class OutlineItem the destination is calculated like this:
Code:
if (dest == null) {
// grab the Destination attribute
Object obj = library.getObject(entries, "Dest");
if (obj != null) {
dest = new Destination(library, obj);
}
}
That means: we need to use the action to get the destination if it is null by retrieving it from OutlineItem.