| Summary: | Hierarchy of master fields on a form | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Pi <pad> |
| Component: | Scout | Assignee: | Project Inbox <scout.core-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ivan.motsch, zimmermann |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Pi
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 |