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.
Yes thxs I though about "custom display" field. Then I can use a String type with "custom display" or perhaps with database list+"custom display" I can catch HTML rendering of select list to add my empty option value line... Anyway Do you know where is source code of Page type to improve it (IMA view mode must display a link to the target)?
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.
Yes it is the same: I just tested. hidden filter is not applied (of course I checked that user preference is "don't show hidden doc") Do you know where is query to check it?