Package io.micronaut.views.fields
Class DefaultFormGenerator
java.lang.Object
io.micronaut.views.fields.DefaultFormGenerator
- All Implemented Interfaces:
FormGenerator
DefaultImplementation
of FormGenerator
.- Since:
- 4.1.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from interface io.micronaut.views.fields.FormGenerator
POST, SUBMIT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Form
generate
(@NonNull @NotBlank String action, @NonNull @NotBlank String method, @NonNull @NotNull Class<T> type, @NonNull @NotNull InputSubmitFormElement inputSubmitFormElement) generate
(@NonNull String action, @NonNull String method, @NonNull Object instance, @NonNull jakarta.validation.ConstraintViolationException ex, @NonNull InputSubmitFormElement inputSubmitFormElement) generate
(String action, String method, Object instance, InputSubmitFormElement inputSubmitFormElement) generateWithFieldset
(@NonNull String action, @NonNull String method, @NonNull Fieldset fieldset, @NonNull InputSubmitFormElement inputSubmitFormElement) Generate FORM with fieldset.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.FormGenerator
generate, generate, generate, generate, generate, generate, generate, generate, generate, generate, generate, generate, generate, generate, generate, generateWithFieldset, generateWithFieldset, generateWithFieldset
-
Constructor Details
-
DefaultFormGenerator
- Parameters:
fieldsetGenerator
- Fieldset Generator
-
-
Method Details
-
generateWithFieldset
public Form generateWithFieldset(@NonNull @NonNull String action, @NonNull @NonNull String method, @NonNull @NonNull Fieldset fieldset, @NonNull @NonNull InputSubmitFormElement inputSubmitFormElement) Description copied from interface:FormGenerator
Generate FORM with fieldset.- Specified by:
generateWithFieldset
in interfaceFormGenerator
- Parameters:
action
- Form action attributemethod
- Form method attributefieldset
- FieldsetinputSubmitFormElement
- input submit- Returns:
- A Form
-
generate
public Form generate(String action, String method, Object instance, InputSubmitFormElement inputSubmitFormElement) - Specified by:
generate
in interfaceFormGenerator
- Parameters:
action
- Form action attributemethod
- Form method attributeinstance
- The Object instance which should beIntrospected
.inputSubmitFormElement
- input submit- Returns:
- A Form
-
generate
public Form generate(@NonNull @NonNull String action, @NonNull @NonNull String method, @NonNull @NonNull Object instance, @NonNull @NonNull jakarta.validation.ConstraintViolationException ex, @NonNull @NonNull InputSubmitFormElement inputSubmitFormElement) - Specified by:
generate
in interfaceFormGenerator
- Parameters:
action
- Form action attributemethod
- Form method attributeinstance
- The Object instance which should beIntrospected
.ex
- A Validation exceptioninputSubmitFormElement
- input submit- Returns:
- A Form
-
generate
public <T> Form generate(@NonNull @NotBlank @NonNull @NotBlank String action, @NonNull @NotBlank @NonNull @NotBlank String method, @NonNull @NotNull @NonNull @NotNull Class<T> type, @NonNull @NotNull @NonNull @NotNull InputSubmitFormElement inputSubmitFormElement) - Specified by:
generate
in interfaceFormGenerator
- Type Parameters:
T
- type- Parameters:
action
- Form action attributemethod
- Form method attributetype
- A class which should beIntrospected
.inputSubmitFormElement
- input submit- Returns:
- A Form
-