@Test public void testGetFormGroup() { renderer.getFormGroup(RenderMode.EDIT_MODE); verify(formGroupsInstance).get(); verify(decimalBox).setId(any()); verify(decimalBox).setPlaceholder(eq(fieldDefinition.getPlaceHolder())); verify(decimalBox).setMaxLength(eq(fieldDefinition.getMaxLength())); verify(decimalBox).setEnabled(eq(!fieldDefinition.getReadOnly())); verify(decimalBox).asWidget(); verify(formGroup).render(anyString(), any(), eq(fieldDefinition)); }
@Override protected FormGroup getFormGroup(RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); if (renderMode.equals(RenderMode.PRETTY_MODE)) { formGroup.render(new HTML(), field); } else { String inputId = generateUniqueId(); decimalBox.setId(inputId); decimalBox.setPlaceholder(field.getPlaceHolder()); decimalBox.setMaxLength(field.getMaxLength()); decimalBox.setEnabled(!field.getReadOnly()); formGroup.render(inputId, decimalBox.asWidget(), field); registerFieldRendererPart(decimalBox); } return formGroup; }
DecimalBoxFieldRenderer extends FieldRenderer<DecimalBoxFieldDefinition, DefaultFormGroup> implements RequiresValueConverter { @Override protected FormGroup getFormGroup(RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); if (renderMode.equals(RenderMode.PRETTY_MODE)) { formGroup.render(new HTML(), field); } else { String inputId = generateUniqueId(); decimalBox.setId(inputId); decimalBox.setPlaceholder(field.getPlaceHolder()); decimalBox.setMaxLength(field.getMaxLength()); decimalBox.setEnabled(!field.getReadOnly()); formGroup.render(inputId, decimalBox.asWidget(), field); registerFieldRendererPart(decimalBox); } return formGroup; } }
DecimalBoxFieldRenderer extends FieldRenderer<DecimalBoxFieldDefinition, DefaultFormGroup> implements RequiresValueConverter { @Override protected FormGroup getFormGroup(RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); if (renderMode.equals(RenderMode.PRETTY_MODE)) { formGroup.render(new HTML(), field); } else { String inputId = generateUniqueId(); decimalBox.setId(inputId); decimalBox.setPlaceholder(field.getPlaceHolder()); decimalBox.setMaxLength(field.getMaxLength()); decimalBox.setEnabled(!field.getReadOnly()); formGroup.render(inputId, decimalBox.asWidget(), field); registerFieldRendererPart(decimalBox); } return formGroup; } @Inject  DecimalBoxFieldRenderer(DecimalBox decimalBox); }
DecimalBoxFieldRenderer extends FieldRenderer<DecimalBoxFieldDefinition, DefaultFormGroup> implements RequiresValueConverter { @Override protected FormGroup getFormGroup(RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); if (renderMode.equals(RenderMode.PRETTY_MODE)) { formGroup.render(new HTML(), field); } else { String inputId = generateUniqueId(); decimalBox.setId(inputId); decimalBox.setPlaceholder(field.getPlaceHolder()); decimalBox.setMaxLength(field.getMaxLength()); decimalBox.setEnabled(!field.getReadOnly()); formGroup.render(inputId, decimalBox.asWidget(), field); registerFieldRendererPart(decimalBox); } return formGroup; } @Inject  DecimalBoxFieldRenderer(DecimalBox decimalBox); @Override String getName(); @Override Converter getConverter(); }
DecimalBoxFieldRenderer extends FieldRenderer<DecimalBoxFieldDefinition, DefaultFormGroup> implements RequiresValueConverter { @Override protected FormGroup getFormGroup(RenderMode renderMode) { DefaultFormGroup formGroup = formGroupsInstance.get(); if (renderMode.equals(RenderMode.PRETTY_MODE)) { formGroup.render(new HTML(), field); } else { String inputId = generateUniqueId(); decimalBox.setId(inputId); decimalBox.setPlaceholder(field.getPlaceHolder()); decimalBox.setMaxLength(field.getMaxLength()); decimalBox.setEnabled(!field.getReadOnly()); formGroup.render(inputId, decimalBox.asWidget(), field); registerFieldRendererPart(decimalBox); } return formGroup; } @Inject  DecimalBoxFieldRenderer(DecimalBox decimalBox); @Override String getName(); @Override Converter getConverter();  }