@Test public void testInitializeWithParams() throws Exception { fieldElementParams.put(PLACEHOLDER_PARAM, PLACEHOLDER); fieldElementParams.put(ROWS_PARAM, ROWS); placeholderInitializer.initialize(field, fieldElement, context); rowsInitializer.initialize(field, fieldElement, context); verify(field).setPlaceHolder(any()); verify(field).setRows(any()); assertEquals(PLACEHOLDER, field.getPlaceHolder()); assertEquals(Integer.valueOf(ROWS), field.getRows()); }
@Override public void initialize(TextAreaFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { String rows = fieldElement.getParams().getOrDefault("rows", "3"); Integer value = Integer.valueOf(rows); if (value != null) { field.setRows(value); } }
TextAreaFieldInitializer implements FieldInitializer<TextAreaFieldDefinition> { @Override public void initialize(TextAreaFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { String rows = fieldElement.getParams().getOrDefault("rows", "3"); Integer value = Integer.valueOf(rows); if (value != null) { field.setRows(value); } } }
TextAreaFieldInitializer implements FieldInitializer<TextAreaFieldDefinition> { @Override public void initialize(TextAreaFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { String rows = fieldElement.getParams().getOrDefault("rows", "3"); Integer value = Integer.valueOf(rows); if (value != null) { field.setRows(value); } }  }
TextAreaFieldInitializer implements FieldInitializer<TextAreaFieldDefinition> { @Override public void initialize(TextAreaFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { String rows = fieldElement.getParams().getOrDefault("rows", "3"); Integer value = Integer.valueOf(rows); if (value != null) { field.setRows(value); } }  @Override boolean supports(FieldDefinition fieldDefinition); @Override void initialize(TextAreaFieldDefinition field,
                           FieldElement fieldElement,
                           FormGenerationContext context); }
TextAreaFieldInitializer implements FieldInitializer<TextAreaFieldDefinition> { @Override public void initialize(TextAreaFieldDefinition field, FieldElement fieldElement, FormGenerationContext context) { String rows = fieldElement.getParams().getOrDefault("rows", "3"); Integer value = Integer.valueOf(rows); if (value != null) { field.setRows(value); } }  @Override boolean supports(FieldDefinition fieldDefinition); @Override void initialize(TextAreaFieldDefinition field,
                           FieldElement fieldElement,
                           FormGenerationContext context);  }