On 7 Sep 2018,
at 16:45, Adel Atallah <adel.atallah(a)xwiki.com> wrote:
I've created a Jira issue, I would appreciate to have some feedback or
changes if needed:
https://jira.xwiki.org/browse/XWIKI-15582
Thanks,
Adel
On Fri, Sep 7, 2018 at 3:02 PM, Thomas Mortagne
<thomas.mortagne(a)xwiki.com> wrote:
> On Thu, Sep 6, 2018 at 2:58 PM Adel Atallah <adel.atallah(a)xwiki.com> wrote:
>>
>> Hi devs,
>>
>> Working on the auto-suggestion feature [1], I've been integrating it
>> in xproperties holding a reference to a page. Those xproperties are of
>> type String and have been changed to the Page type so that the page
>> displayer is used and shows the auto-suggestion when needed.
>
> Since we talk about new entity properties types and bring back the
> following subject: a pity the type is called "page" since it actually
> contain document reference and collide with the new page reference.
> But hard to change now...
>
> We'll need to introduce a new type which store serialized
> PageReference at some point since that's what most new xobjects should
> use ideally. But it can't be used for existing property which
> currently contain document references since the syntax is different.
>
> The best to avoid confusion with two different "page*" types names
> would probably be to have the PageClass have a type which could be:
> * document (set to existing page properties with a migration)
> * page (the default)
> * space ?
>
> BaseClass#addPageField hasn't been released yet (@since 10.8RC1) so
> it's the right time, later we would have to keep "document" as the
> default in it which would not be very elegant since we want people to
> use page reference in the future as much as possible.
>
>>
>> I now need to implement an auto-suggestion on xproperties holding a
>> reference to a space (e.g [2]), a wiki (e.g [2]) and an attachment
>> (e.g. [3]).
>> I think the best would be to create an Attachment and Wiki xproperty
>> type and create new displayers exactly like the Page type.
>>
>> I don't think we can create a Space xproperty because it's not meant
>> to be visible by the end user.
>> Maybe we could use the Page xproperty type and have a parameter inside
>> to select only spaces.
>>
>> WDYT?
>>
>> Thanks,
>> Adel
>>
>> --------
>> [1]
https://design.xwiki.org/xwiki/bin/view/Proposal/AutocompleteOnReference
>> [2]
https://design.xwiki.org/xwiki/bin/view/Proposal/AutocompleteOnReference#HC…
>> [3]
https://design.xwiki.org/xwiki/bin/view/Proposal/AutocompleteOnReference#HC…
>
>
>
> --
> Thomas Mortagne