As i was working on a BEA Portal 8.1.5, trying to obtain the number of children of a view through the "BookView" Interface, obtained itself as follows :
BookView bv = PortalAdminManager.getBookView(myBookDefinitionId, myLocale, myHttpRequest);
i encountered a problem when running this code :
if(bv.getNavigableViews().length == 0) // etc
This condition was always met...altough the book title, the bookInstance id etc. are correct...Why??? Thank to the documentation of BEA 9.2, i finally figured out how it was working....
It appears that the method "getBookView" exists with two different signatures, one retrieving a "shallow" (lightweight) BookView, the other one retrieving the full object. If you want to use the methods getPageCount, getBookCount, getNavigableViews etc., DON'T use the shallow object : it's empty...
The code to use then is :
BookView bv = PortalAdminManager.getBookView(myParentBookInstanceId, myBookDefinition.getWebAppName(), myPortalPath, myDesktopPath, true, myLocale, request);

This is a pretty tricky error, as the code compiles and runs without any Exception rise...Hope that helps someone somewhere sometimes !