On Aug 23, 2011, at 9:33 AM, Maxime Sinclair wrote:

> Thank you for you prompt reply and for the tip.
> 
> It's a code feature but a javadoc issue :
> http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/platform/xwiki-platform-oldcore/3.2-milestone-2/xwiki-platform-oldcore-3.2-milestone-2-javadoc.jar/!/index.html
> and this link was found on 
> http://platform.xwiki.org/xwiki/bin/view/DevGuide/API
> 
> Hope this help to enhance xwiki documentation :)

A patch would have been awesome but yes it helps ;)

I've fixed it:
https://github.com/xwiki/xwiki-platform/commit/fb701a4caf9dcfc77415d19756627c93b246c774

Thanks
-Vincent

> 2011/8/22 Vincent Massol <[email protected]>:
>> 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

Reply via email to