Anca Paula Luca a écrit :
Hi Asiri,
see below
Asiri Rathnayake wrote:
Hi devs,
Currently the above method is implemented so as to set the absolute name of
the parent document as the parent name of a page. Assuming we don't support
That assumption is a bit too much. Why wouldn't we?
inter-wiki parent-child relationships, I propose
we should modify this
method not to include the "wiki:" prefix in the parent name because it
breaks the wysiwyg (not displaying parent-child relationships correctly).
Now I'm not exactly sure whether it is the wysiwyg or this method that needs
fixing, but the latter is easier to fix.
This seems to be fixed by
http://jira.xwiki.org/jira/browse/XWIKI-3848 .
and this is the correct fix, the technically easy but unnatural fix seems to
have the bad habit of biting back later...
The wysiwyg needs to be fixed. However the Importer also needs to be fixed.
It is the same discussion about backlinks where I gave a -1 to absolute
links.
We should not have absolute links when we are in the same wiki. We
should even not have the space included if we are in the same space.
Links should be relative and parent is a sort of a link.
Can we try to agree about this behavior and implement it like that
whenever we can ?
For now the xwiki: generated by the Importer is creating a bunch of
issues on a client project (the bug in the Wysiwyg is one of them).
Ludovic
If we do decide to modify this method, should i
simply use:
<code>
public void setParent(DocumentName parentName)
{
this.parent = parentName.getSpace() + "." + parentName.getPage();
}
</code>
Or should I use a custom DocumentNameSerializer?
Otherwise, you should always use a factory / serializer pair whenever parsing /
writing xwiki resources as strings. There was an idea at one point to be able to
pass the format of the reference to be produced to the Serializer (Space.Page,
only page, wiki:space.page, etc).
Happy hacking,
Anca
Thanks a lot.
- Asiri
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Ludovic Dubost
Blog:
http://blog.ludovic.org/
XWiki:
http://www.xwiki.com
Skype: ldubost GTalk: ldubost