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...
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