Hi, On Aug 22, 2011, at 5:41 PM, Maxime Sinclair wrote:
> Hi, > > In XE 2.7.2 and 3.1, using Groovy in a wiki page, a call to > - xwiki.getDocument( "Main.WebHome") returns the correct document object > - xwiki.getDocument( "WebHome") returns the WebHome doc object of the > current space (not really documented in the javadoc) > - xwiki.getDocument( "NotExistingDocName") returns a Document object > (a empty one I suppose) instead of a null > > Is it a bug or do I miss something ? It's a feature. It creates a doc if it doesn't exist (but not saved). > Is there another way to test that a page, specified by its name, exists ? xwiki.getDocument( "NotExistingDocName").isNew(). Thanks -Vincent _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
