On Fri, Jun 8, 2012 at 6:38 PM, Marius Dumitru Florea
<[email protected]> wrote:
> Hi devs,
>
> Following Anca's comments on http://jira.xwiki.org/browse/XWIKI-6058 I
> realized that the current document and the current wiki (database) are
> completely independent: you can have "someWiki" as the current wiki
> (context.setDatabase("someWiki")) and otherWiki:Space.Page as the
> current document (document.setAsContextDoc(context)). This means that
> it's not enough to set the current document if you want relative
> references to be resolved relative to that document. You also need to
> set the current wiki,
>
> Is this the desired behaviour? Should setAsContextDoc also set the
> current wiki? WDYT?

The main problem here is that we are dealing with APIs that are very
hard to modify a inch for retro compatibility reasons. So unless there
is a direct security risk I would say that all we can do is document
it.

Now for what the hell do we have two concepts, the way I understand
those two is the following: they are not operating exactly at the same
level.
* "view" level: the current document is pretty much totally unknown
outside of client/scripting area ("point of view" document,
programming right, etc.)
* model level: context wiki (that is actually called model context
reference and not just wiki in the model module API but is still the
XWikiContext wiki behind the scene because it's not that easy to
change and will probably be one of the last things we get rid of
before definitely loose oldcore) is the reference point when
navigating between model entities

Lets call it a desperate attempt to something that has not really been
designed some meaning and stick to it to not get crazy when playing
with it :)

>
> Thanks,
> Marius
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to