How to add the Select all checkbox onto a Select Page with a list view?

0
I have a pair of entities and a reference set between them and I generated overview pages for the entities. Also, on the generated Select Page I replaced the Data Grid with a List View to have implicit checkboxes. Now I want to add the “Select All” checkbox on the top of the page. I wanted to add a regular checbox and attach an On Change Microflow to it and that microflow would clear or populate the reference set of the parent object and refresh the client. However, the problem is there’s no parent entity in the context of the page. In Mendix a Select Page does not need a page parameter (and adding one causes an compilation error). The currently associated list view items or the data grid rows are highlighted by some poorly documented part of the UI framework.  
asked
3 answers
1

Hi ilya,

For achieving this you need to add 2 boolean attributes in that entity one is isSelect which is for each object of that entity, and another boolean for SelectAll abjects of that entity. 

Add checkboxes on the page one is for each row in the list assign it a isSelect variable, and one is master checkbox and assign a SelectAll variable from the entity.

We have onClick function for checkbox in Mendix select call microflow option from the onClick option.

In a  microflow get the list of all object by using retrieve activity.

And take one decision box set ‘SelectAll=true’ and set the value of “isSelect = true” for the list of object which we retrieved before on true condition, and for false set the “isSelect=false”.

Refer below link its not in Mendix but we can use the logic which explained in the video 

https://youtu.be/uP9vJVH8PsY

Hope this will help you.

 

 

answered
0

After some debugging I found that a Select Page gets special form parameters:

  mx.ui.openForm2 = async ƒ (e,n,r,o,a)
where 
  a: {
      "formParams": {
          "initialSelection": [
              "33776997205283421"
          ],
          "pageSelectionTopic": "1630746742541-11",

So if we somehow get access to the selection array then I think we can control it with a checkbox.

If Mendix provided an unminified debug version of their UI javascript things would be much easier for us.

answered
0

Hi ilya,

For achieving this you need to add 2 boolean attributes in that entity one is isSelect which is for each object of that entity, and another boolean for SelectAll abjects of that entity. 

Add checkboxes on the page one is for each row in the list assign it a isSelect variable, and one is master checkbox and assign a SelectAll variable from the entity.

we have onClick function for checkbox in Mendix select call microflow option from the onClick option.

In a  microflow get the list of all object by using retrieve activity.

answered