mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +01:00
[formtypes] Add FormFieldRegistry.register(String, FormField.Type, String...)
This commit is contained in:
parent
fc7fc10c69
commit
e1845a52ca
1 changed files with 6 additions and 0 deletions
|
@ -67,6 +67,12 @@ public class FormFieldRegistry {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void register(String formType, FormField.Type fieldType, String... fieldNames) {
|
||||||
|
for (String fieldName : fieldNames) {
|
||||||
|
register(formType, fieldName, fieldType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void register(String formType, String fieldName, FormField.Type fieldType) {
|
public static void register(String formType, String fieldName, FormField.Type fieldType) {
|
||||||
StringUtils.requireNotNullNorEmpty(fieldName, "fieldName must be provided");
|
StringUtils.requireNotNullNorEmpty(fieldName, "fieldName must be provided");
|
||||||
Objects.requireNonNull(fieldType);
|
Objects.requireNonNull(fieldType);
|
||||||
|
|
Loading…
Reference in a new issue