Input Reference Set Selector
The input reference set selector widget is not supported on native mobile pages.
To upgrade it to a React-compliant widget which works on a native page, see the Mendix React Client’s Migration Guide.
Introduction
An input reference set selector is used to allow the end-user to display or select the value (or values) of a many-to-many (reference set) association by selecting the associated object (or objects).
An input reference set selector must be placed in a data container.
For example, you could group customers into groups, and each customer could belong to several groups. Each Group can have many customers. The entities Customer and Group have a many-to-many (reference set) relationship. An input reference set selector can be used to select the groups the customer belongs to.
What you can do with an input reference set selector depends on the Owner of the association. In the example domain model below, Owner is set to Default (in the association properties ‘Customer’ objects refer to ‘Group’ objects).
You can put an input reference set selector in a Customer data view to allow the user to select the Group (or Groups) to which the customer belongs. However, because the Customer is the owner of the association, you cannot put an input reference set selector in a Group data view to select the Customer (or Customers) in the Group.
To allow you to both add a Group to a Customer, and add a Customer to a Group, you need to set ownership of the association to Both.
In the input reference set selector, the path to the attribute to be displayed (association, related entity, and attribute) is shown inside the input reference set selector, displayed between square brackets, and colored blue.
For example, using the domain model above, the following input reference set selector allows the end-user to associate a Customer with one or more Groups by setting the association Customer_Group. This is done by selecting the Name of the Group associated with the current Customer.
Properties
An example of input reference set selector properties is represented in the image below:
Reference set selector properties consist of the following sections:
Common Section
Data Source Section
This selects which attribute will be used within the widget. You can only select attributes which have the correct data type(s).
For more information on selecting a data source, see the Data Source Section section in Properties Common in the Page Editor.
The attribute path specifies which attribute (or attributes) of an associated entity is shown in the reference set selector. The path must follow one association, of type reference set, starting in the entity of the data view.
Design Properties Section
Editability Section
Editability determines whether an end-user can change the value in an input widget.
For more information on properties of this section, see the Editability Section section of Properties Common in the Page Editor.
Events Section
The on-change property specifies an action that will be executed when leaving the widget, either by using the Tab key or by clicking another widget, after the value has been changed.
General Properties
Select Page
The select page property determines which page is displayed when the input reference selector is clicked. This page can be used to select associated objects from the list of selectable objects. This page should contain a data grid, template grid or list view connected to the same entity as the input reference set selector.
If an input reference set selector is never editable, a select page is not required.
See the Show a Page section of On Click Event and Events Section. Note that select pages must have a pop-up layout.
Label Section
A label describes the purpose of a widget to the end-user.
For more information on properties of this section, see the Label Section section in Properties Common in the Page Editor.
Selectable Objects Section
The properties in the Selectable objects section determine the objects from which the end user can make a selection. As source, you can use Database or XPath. When using XPath, you can add an XPath constraint, or use a Constrained by path.
For more information, see the Selectable Objects section of Reference Selector.
Visibility Section
Visibility determines whether a widget is displayed to the end-user as part of the page.
For more information on properties of this section, see the Visibility Section section in Properties Common in the Page Editor.