From 3223d0f290908cef5817bae5572e49865a9d7db4 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Mon, 5 Apr 2004 16:27:40 +0000 Subject: [PATCH] Adds new constructor that makes the "variable" attribute required git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2279 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smackx/FormField.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source/org/jivesoftware/smackx/FormField.java b/source/org/jivesoftware/smackx/FormField.java index 046d459e2..a45bf7336 100644 --- a/source/org/jivesoftware/smackx/FormField.java +++ b/source/org/jivesoftware/smackx/FormField.java @@ -81,6 +81,16 @@ public class FormField { private List options = new ArrayList(); private List values = new ArrayList(); + /** + * Creates a new FormField with the variable name that uniquely identifies the field + * in the context of the form. + * + * @param variable the variable name of the question. + */ + public FormField(String variable) { + this.variable = variable; + } + /** * Returns a description that provides extra clarification about the question. This information * could be presented to the user either in tool-tip, help button, or as a section of text @@ -229,15 +239,6 @@ public class FormField { this.type = type; } - /** - * Returns the variable name that the question is filling out. - * - * @param variable the variable name of the question. - */ - public void setVariable(String variable) { - this.variable = variable; - } - /** * Adds a default value to the question if the question is part of a form to fill out. * Otherwise, adds an answered value to the question.