mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-470: Allow TEXT fields to be associated with predefined sets of known-good values.
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
package org.apache.guacamole.form;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Represents a basic text field. The field may generally contain any data, but
|
||||
* may not contain multiple lines.
|
||||
@@ -35,6 +37,21 @@ public class TextField extends Field {
|
||||
super(name, Field.Type.TEXT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new TextField with the given name and possible values. As a
|
||||
* text field may contain any data by definition, any provided options are
|
||||
* simply known-good values.
|
||||
*
|
||||
* @param name
|
||||
* The unique name to associate with this field.
|
||||
*
|
||||
* @param options
|
||||
* A set of known legal options for this field.
|
||||
*/
|
||||
public TextField(String name, Collection<String> options) {
|
||||
super(name, Field.Type.TEXT, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the given string, interpreting empty strings as equivalent to
|
||||
* null. For all other cases, the given string is returned verbatim.
|
||||
|
Reference in New Issue
Block a user