Class ViewsFormElementRenderer<T extends FormElement>
java.lang.Object
io.micronaut.views.fields.render.views.ViewsFormElementRenderer<T>
- Type Parameters:
T
- form element
- All Implemented Interfaces:
FormElementRenderer<T>
- Direct Known Subclasses:
InputCheckboxViewsFormElementRenderer
,InputDateTimeLocalViewsFormElementRenderer
,InputDateViewsFormElementRenderer
,InputEmailViewsFormElementRenderer
,InputHiddenViewsFormElementRenderer
,InputNumberViewsFormElementRenderer
,InputPasswordViewsFormElementRenderer
,InputRadioViewsFormElementRenderer
,InputSubmitViewsFormElementRenderer
,InputTelViewsFormElementRenderer
,InputTextViewsFormElementRenderer
,InputTimeViewsFormElementRenderer
,InputUrlViewsFormElementRenderer
,OptionViewsFormElementRenderer
,SelectViewsFormElementRenderer
,TextareaViewsFormElementRenderer
,TrixEditorViewsFormElementRenderer
@Internal
public class ViewsFormElementRenderer<T extends FormElement>
extends Object
implements FormElementRenderer<T>
Implementation of
FormElementRenderer
which uses ViewsRenderer
to render a form element with a view template.- Since:
- 4.1.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from interface io.micronaut.views.fields.render.FormElementRenderer
ATTR_CHECKED, ATTR_COLS, ATTR_DISABLED, ATTR_FOR, ATTR_ID, ATTR_MAX, ATTR_MAX_LENGTH, ATTR_MIN, ATTR_MIN_LENGTH, ATTR_NAME, ATTR_PATTERN, ATTR_PLACEHOLDER, ATTR_READ_ONLY, ATTR_REQUIRED, ATTR_ROWS, ATTR_SELECTED, ATTR_SIZE, ATTR_STEP, ATTR_TYPE, ATTR_VALUE, GREATER_THAN, LESS_THAN, SLASH, SPACE
-
Constructor Summary
ConstructorDescriptionViewsFormElementRenderer
(ViewsRenderer<Map<String, FormElement>, ?> viewsRenderer, String viewName) ViewsFormElementRenderer
(ViewsRenderer<Map<String, FormElement>, ?> viewsRenderer, String viewName, String modelKey) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.views.fields.render.FormElementRenderer
attributes, content, render, render, renderCloseTag, renderLabel, renderOpenTag, typeHtmlAttribute
-
Constructor Details
-
ViewsFormElementRenderer
public ViewsFormElementRenderer(ViewsRenderer<Map<String, FormElement>, ?> viewsRenderer, String viewName, String modelKey) - Parameters:
viewsRenderer
- Views RendererviewName
- View NamemodelKey
- Model Key
-
ViewsFormElementRenderer
public ViewsFormElementRenderer(ViewsRenderer<Map<String, FormElement>, ?> viewsRenderer, String viewName) - Parameters:
viewsRenderer
- Views RendererviewName
- View Name
-
-
Method Details
-
render
Description copied from interface:FormElementRenderer
Renders a Form Element as HTML.- Specified by:
render
in interfaceFormElementRenderer<T extends FormElement>
- Parameters:
formElement
- Form Elementlocale
- Locale- Returns:
- HTML
-