mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 09:09:38 +02:00
Fix documentation wrt FormField and DataForm Type
This commit is contained in:
parent
1bc3e10cff
commit
9d775c8418
2 changed files with 8 additions and 8 deletions
|
@ -59,7 +59,7 @@ muc.create("testbot");
|
|||
|
||||
// Send an empty room configuration form which indicates that we want
|
||||
// an instant room
|
||||
muc.sendConfigurationForm(new Form(Form.TYPE_SUBMIT));
|
||||
muc.sendConfigurationForm(new Form(DataForm.Type.submit));
|
||||
```
|
||||
|
||||
In this example we can see how to create a reserved room. The form is
|
||||
|
@ -82,7 +82,7 @@ Form submitForm = form.createAnswerForm();
|
|||
// Add default answers to the form to submit
|
||||
for (Iterator fields = form.getFields(); fields.hasNext();) {
|
||||
FormField field = (FormField) fields.next();
|
||||
if (!FormField.TYPE_HIDDEN.equals(field.getType()) && field.getVariable() != null) {
|
||||
if (!FormField.type.hidden.equals(field.getType()) && field.getVariable() != null) {
|
||||
// Sets the default value as the answer
|
||||
submitForm.setDefaultAnswer(field.getVariable());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue