InitRefSelect en création

J’ai contourné en utilisant un paramètre de session.

En front

// When object form is loaded in the container ctn
                p.form.onload = function(ctn, obj, params) {

					// Bind change on a view (V5.2 for N,N pillbox or edit list)
					var sender = ui.getUIField(ctn, obj, "rciFloAppSenderId");
					var recept = ui.getUIField(ctn, obj, "rciFloAppReceptId");

                    var subsView = ui.getUIView(ctn, obj, "RciFloSub;rciFlosubFloId") ;
                    
                    enableSubsView(sender, recept, subsView);
                    
                    sender && sender.ui.change(function(e) {
                    	$ui.grant.setParameter("FLOW_SENDER_ID", sender.value());
                    	
                    	enableSubsView(sender, recept, subsView);	
                    });
                    
                    recept && recept.ui.change(function(e) {
                    	$ui.grant.setParameter("FLOW_RECEPT_ID", recept.value());
                    	
                    	enableSubsView(sender, recept, subsView);
                    });
                }

En back

@Override
	public void initRefSelect(ObjectDB parent) {

		resetSelectedIds();

		if (parent.getName().equals("RciFlow"))
		{
			String senderId = parent.getFieldValue("rciFloAppSenderId"), receptId = parent.getFieldValue("rciFloAppReceptId");
			if (senderId == null || senderId.isEmpty())
			{
				senderId = getGrant().getParameter("FLOW_SENDER_ID");
			}
			
			if (receptId == null || receptId.isEmpty())
			{
				receptId = getGrant().getParameter("FLOW_RECEPT_ID");
			}
			
			String req = " AND (t.row_id in (select rci_appsub_sub_id from rci_app_sub where rci_appsub_app_id = " + receptId
				+ " ) OR NOT EXISTS (select rci_appsub_sub_id from rci_app_sub where rci_appsub_app_id = " + receptId
				+ " )) AND (t.row_id in (select rci_appsub_sub_id from rci_app_sub where rci_appsub_app_id = " + senderId
				+ " ) OR NOT EXISTS (select rci_appsub_sub_id from rci_app_sub where rci_appsub_app_id = " + senderId + "))";

			this.setSearchSpec(getDefaultSearchSpec() + req);
			
		}
		else
			this.setSearchSpec(getDefaultSearchSpec());

		super.initRefSelect(parent);
	}

Maintenant il me reste à trouver comment bloquer l’utilisation de la pillbox si les champs nécessaires ne sont pas remplis (voir Mettre une pillbox en lecture seule)