On Wed, Apr 15, 2015 at 6:52 PM, Pascal BASTIEN <pbasnews-xw...@yahoo.fr> wrote: > Hello, > > I create MyClass/Sheet/Template and in another AnotherClass I add a Page type > property with: > - Display Type : select > - XWiki Class Name: MyClass > - Id Field Name: doc.fullName > - Value Field Name : doc.name > > My purpose is to display a list of page (with MyClass object): this point is > working well but ... >
> I want that the user select in my select list: one page OR nothing. The HTML select element supports either single selection (exactly one item selected) or multiple selection (0..*). To achieve 0..1 you need to have a special item "Nothing" with value '' (empty string) and in order to add this item to a Page (actually DatabaseList) property you have to write a custom displayer. Another solution may be to create a special page with a MyClass object that represents the "nothing" value (when selected), but you still need to hack something in order to have this option displayed first. > > Do you have an idea, how can I do that? > > I found a issue too: my select list list all page (with MyClass object) ... > even my Template with MyClass object who is hidden. Does it behave the same with a DatabaseList property? The Page property is nothing more than a wrapper for the DatabaseList property. Hope this helps, Marius > > Thxs. > > Pascal B (xWiki 6.4) > > > > > > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users