@Test public void testGetFormGroup() { renderer.getFormGroup(RenderMode.EDIT_MODE); verify(formGroupsInstance).get(); verify(checkBox).setId(any()); verify(checkBox).setName(anyString()); verify(checkBox).setEnabled(eq(!fieldDefinition.getReadOnly())); verify(formGroup).render(eq(checkBox), eq(fieldDefinition)); }
@Override protected FormGroup getFormGroup(RenderMode renderMode) { checkbox.setId(generateUniqueId()); checkbox.setName(fieldNS); checkbox.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE)); CheckBoxFormGroup formGroup = formGroupsInstance.get(); formGroup.render(checkbox, field); registerFieldRendererPart(checkbox); return formGroup; }
CheckBoxFieldRenderer extends FieldRenderer<CheckBoxFieldDefinition, CheckBoxFormGroup> { @Override protected FormGroup getFormGroup(RenderMode renderMode) { checkbox.setId(generateUniqueId()); checkbox.setName(fieldNS); checkbox.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE)); CheckBoxFormGroup formGroup = formGroupsInstance.get(); formGroup.render(checkbox, field); registerFieldRendererPart(checkbox); return formGroup; } }
CheckBoxFieldRenderer extends FieldRenderer<CheckBoxFieldDefinition, CheckBoxFormGroup> { @Override protected FormGroup getFormGroup(RenderMode renderMode) { checkbox.setId(generateUniqueId()); checkbox.setName(fieldNS); checkbox.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE)); CheckBoxFormGroup formGroup = formGroupsInstance.get(); formGroup.render(checkbox, field); registerFieldRendererPart(checkbox); return formGroup; }  }
CheckBoxFieldRenderer extends FieldRenderer<CheckBoxFieldDefinition, CheckBoxFormGroup> { @Override protected FormGroup getFormGroup(RenderMode renderMode) { checkbox.setId(generateUniqueId()); checkbox.setName(fieldNS); checkbox.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE)); CheckBoxFormGroup formGroup = formGroupsInstance.get(); formGroup.render(checkbox, field); registerFieldRendererPart(checkbox); return formGroup; }  @Override String getName(); }
CheckBoxFieldRenderer extends FieldRenderer<CheckBoxFieldDefinition, CheckBoxFormGroup> { @Override protected FormGroup getFormGroup(RenderMode renderMode) { checkbox.setId(generateUniqueId()); checkbox.setName(fieldNS); checkbox.setEnabled(!field.getReadOnly() && renderingContext.getRenderMode().equals(RenderMode.EDIT_MODE)); CheckBoxFormGroup formGroup = formGroupsInstance.get(); formGroup.render(checkbox, field); registerFieldRendererPart(checkbox); return formGroup; }  @Override String getName();  }