Add support for multiline text fields.
This commit is contained in:
1 parent
afb8474c28
commit
a920199ab7
6 files changed
+75
-6
No files matched your search
@@ -58,7 +58,13 @@ public class ProtocolParameter {
|
||||
* An enumerated parameter, whose legal values are fully enumerated
|
||||
* by a provided, finite list.
|
||||
*/
|
||||
ENUM
|
||||
ENUM,
|
||||
|
||||
/**
|
||||
* A text parameter that can span more than one line.
|
||||
*/
|
||||
MULTILINE
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -166,6 +166,11 @@ public class List extends AuthenticatingHttpServlet {
|
||||
xml.writeAttribute("type", "enum");
|
||||
break;
|
||||
|
||||
// Multiline parameter
|
||||
case MULTILINE:
|
||||
xml.writeAttribute("type", "multiline");
|
||||
break;
|
||||
|
||||
// If unknown, fail explicitly
|
||||
default:
|
||||
throw new UnsupportedOperationException(
|
||||
|
||||
+4
@@ -61,6 +61,10 @@ public class ParamTagHandler implements TagHandler {
|
||||
else if ("enum".equals(type))
|
||||
protocolParameter.setType(ProtocolParameter.Type.ENUM);
|
||||
|
||||
// Multiline field
|
||||
else if ("multiline".equals(type))
|
||||
protocolParameter.setType(ProtocolParameter.Type.MULTILINE);
|
||||
|
||||
// Boolean field
|
||||
else if ("boolean".equals(type)) {
|
||||
protocolParameter.setType(ProtocolParameter.Type.BOOLEAN);
|
||||
|
||||
Reference in new issue
Block a user