AppWithinMinutes is displaying stuff in a Page field when it should be null or blank

Hi all,

I created an AppWithinMinutes application and today I added a Page field to it. I’ve limited the input entries to a certain class for it.

Now in display mode for all of my existing documents, instead of seeing a null entry for this field, I have a link to the page of my overall class. If I go into edit mode, there is no preselected fields, and if I select from my suggested options, everything works fine.

tldr; How can I get a Page field to stay blank in view mode if the user has not selected anything?

What version of XWiki do you have? Because on my XWiki 11.8 instance the Page field doesn’t have any configuration on the UI to limit the input entries to a certain class. Maybe you’ve used the Database List field? In any case, I tested with the Database List field and I don’t reproduce your behavior.

Note that the way the field is displayed in view mode depends also on the other configuration options of the field (e.g. whether multiple selection is enabled or not).

Thanks for responding. I am on version 10.11.9, and I am definitely using the Page picker. I’m able to limit the entries by going into the class editor for the AppWithinMinutes class… there I can see all of the options that a DBList picker would have, except that xWiki knows that we are discussing a page specifically.

I’m noticing a few other minor bugs (I’ll create a new topic for them) but generally speaking it’s an awesome feature that needs a bit of honing.

For the time being, to fix this particular problem, I went into the sheet and tested to see if the user was in view or edit mode using Velocity. Then I check to see if the value for that field is not null… if it isn’t, then I show the page object. If the field is null, then I display nothing at all.