1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 22:11:07 +01:00

Introduce FormFieldChildElement and make FormField immutable

This commit is contained in:
Florian Schmaus 2019-06-10 16:58:38 +02:00
parent 1a99801501
commit 4d36e3b521
36 changed files with 1191 additions and 490 deletions

View file

@ -665,8 +665,10 @@ public class ConfigureForm extends Form {
String fieldName = nodeField.getFieldName();
if (getField(fieldName) == null) {
FormField field = new FormField(fieldName);
field.setType(type);
FormField field = FormField.builder()
.setVariable(fieldName)
.setType(type)
.build();
addField(field);
}
}

View file

@ -209,9 +209,9 @@ public class SubscribeForm extends Form {
String fieldName = nodeField.getFieldName();
if (getField(fieldName) == null) {
FormField field = new FormField(fieldName);
FormField.Builder field = FormField.builder(fieldName);
field.setType(type);
addField(field);
addField(field.build());
}
}
}