Community
Participate
Working Groups
Build Identifier: We have the following case: field A is master of field B and field B is master of field C. In this case there is a problem when opening a form in Modify Mode. The fields B and C are declared as slave fields since they are at least once a slave. The master fields are filled in first. Field B is not filled in because it is declared a slave field. Now in the case that field C would be filled in first it remains empty because its master (C) is empty. In my opinion there should be no logic like this. Just let the selected data get in the fields. We don't want to trick the users, do we? Reproducible: Sometimes Steps to Reproduce: 1. take form with at least a 3 chain of master fields 2. edit entity (opens form) 3. randomly last slave is filled in or not
This is just one view of the topic. Many developers use that master-trigger to do some logic, regardless whether the value change was done by the user or by loading the form with a form data. Applying your proposed solution would break this code. However if your form should not fire any master-slave triggers during load either mark the slaves as getConfiguredMasterRequired=false or simply override execChangedMasterValue in the slave fields. That way you have full control over what happens when the master value changes. For example use the following code to only clear slave values when the form is loaded and not when it is loading: protected void execChangedMasterValue(Object newMasterValue) throws ProcessingException { if(getForm().isFormLoading()){ //do nothing } else{ //a value change happened on the open form (by the user) setValue(null); //OR super.execChangedMasterValue(newMasterValue); } }
This is not a bug and requires no fix. see previous comment.
ticket closed