mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-10078 Add more context to FieldGroup error message "field already registered"
This commit is contained in:
parent
991001a315
commit
d94475755b
@ -209,7 +209,7 @@ public class DesktopFieldGroup extends DesktopAbstractComponent<JPanel>
|
||||
|
||||
@Override
|
||||
public void addField(FieldConfig fc, int colIndex) {
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field is already registered");
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field '%s' is already registered", fc.getId());
|
||||
checkArgument(this == ((FieldConfigImpl) fc).getOwner(), "Field does not belong to this FieldGroup");
|
||||
|
||||
if (colIndex < 0 || colIndex >= getColumns()) {
|
||||
@ -222,7 +222,7 @@ public class DesktopFieldGroup extends DesktopAbstractComponent<JPanel>
|
||||
|
||||
@Override
|
||||
public void addField(FieldConfig fc, int colIndex, int rowIndex) {
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field is already registered");
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field '%s' is already registered", fc.getId());
|
||||
checkArgument(this == ((FieldConfigImpl) fc).getOwner(), "Field does not belong to this FieldGroup");
|
||||
|
||||
if (colIndex < 0 || colIndex >= getColumns()) {
|
||||
|
@ -162,7 +162,7 @@ public class WebFieldGroup extends WebAbstractComponent<CubaFieldGroupLayout>
|
||||
|
||||
@Override
|
||||
public void addField(FieldConfig fc, int colIndex) {
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field is already registered");
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field '%s' is already registered", fc.getId());
|
||||
checkArgument(this == ((FieldConfigImpl) fc).getOwner(), "Field does not belong to this FieldGroup");
|
||||
|
||||
if (colIndex < 0 || colIndex >= component.getColumns()) {
|
||||
@ -175,7 +175,7 @@ public class WebFieldGroup extends WebAbstractComponent<CubaFieldGroupLayout>
|
||||
|
||||
@Override
|
||||
public void addField(FieldConfig fc, int colIndex, int rowIndex) {
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field is already registered");
|
||||
checkArgument(!fields.containsKey(fc.getId()), "Field '%s' is already registered", fc.getId());
|
||||
checkArgument(this == ((FieldConfigImpl) fc).getOwner(), "Field does not belong to this FieldGroup");
|
||||
|
||||
if (colIndex < 0 || colIndex >= component.getColumns()) {
|
||||
|
Loading…
Reference in New Issue
Block a user