On Sep 6, 2011, at 4:14 PM, Marius Dumitru Florea wrote:
> Hi devs,
>
> I think we all agree that the result of
>
> {{include document="Space.Page" context="new" /}}
>
> must be similar with what we see when we view Space.Page. Now, suppose
> Space.Page has an object of type Space.Class and Space.Class has a
> sheet named Space.Sheet. If the sheet is applied to Space.Page using
> the include macro in the content field like this:
>
> {{include document="Space.Sheet" /}}
>
> then the result of the first include macro is as expected. If we don't
> use the content field to apply the sheet (which is the case of the
> sheet management module I'm working on) then the result of the first
> include macro is not anymore as expected. The reason is that rendering
> the content of Space.Page (could be empty) is different than rendering
> the Space.Sheet in the context of Space.Page.
>
> I could modify the include macro to use the sheet module when
> context=new, but I think it's better to hide the sheet module from the
> include macro, e.g. by modifying the getRenderedContent() method to
> use the sheet module instead.
I haven't fully read and computed the above (I don't have much time right now)
but here's a general comment:
1)the include macro shouldn't know anything about sheets
2) I don't think that XWikiDocument methods should know anything about sheets
either.
The sheet system should be something that sits on top of the model/existing
modules and not have any hardcoded ties. It should be possible for someone
coding against the xwiki platform to not use sheets at all and not have sheet
code in his runtime.
Now if we make exceptions for some reason (which needs to be debated) then
we'll need to find out how we want it to be in the future so that we know how
to solve it cleanly and then document the hack while we wait for the target
implementation to be ready.
Thanks
-Vincent
> WDYT?
>
> Thanks,
> Marius
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs