Deprecated. The UI service was deprecated on December 11, 2014. To create user interfaces, use the HTML service instead.
Base interface for client and server handlers.
Implementing classes
Name | Brief description |
---|---|
| An event handler that runs in the user's browser without needing a call back to the server. |
| An event handler that runs on the server. |
Deprecated methods
Method | Return type | Brief description |
---|---|---|
| String | Returns the id that has been assigned to this object. |
| String | Gets the text tag of this . |
| String | Gets the type of this object. |
|
| Sets the id of this . |
|
| Sets the text tag of this . |
|
| Sets this handler to fire only if the given widget's value is a valid email address. |
|
| Sets this handler to fire only if the given widget's value can be interpreted as an integer. |
|
| Sets this handler to fire only if the given widget's value is a string whose length is between min and max. |
|
| Sets this handler to fire only if the given widget's value matches this regular expression. |
|
| Sets this handler to fire only if the given widget's value matches this regular expression. |
|
| Sets this handler to fire only if the given widget's value is not a valid email address. |
|
| Sets this handler to fire only if the given widget's value cannot be interpreted as an integer. |
|
| Sets this handler to fire only if the given widget's value is a string whose length is less than min or greater than max. |
|
| Sets this handler to fire only if the given widget's value does not match this regular expression. |
|
| Sets this handler to fire only if the given widget's value does not match this regular expression. |
|
| Sets this handler to fire only if the given widget's value cannot be interpreted as an number. |
|
| Sets this handler to fire only if the given widget's value is not one of the strings given in the options parameter. |
|
| Sets this handler to fire only if the given widget's value cannot be interpreted as a number that is between min and max. |
|
| Sets this handler to fire only if the given widgets have values that are not numbers, or that do not sum up to the given value. |
|
| Sets this handler to fire only if the given widget's value can be interpreted as a number. |
|
| Sets this handler to fire only if the given widget's value is one of the strings given in the options parameter. |
|
| Sets this handler to fire only if the given widget's value can be interpreted as a number and is between min and max. |
|
| Sets this handler to fire only if the given widgets have values that are numbers and sum up to the given value. |
Deprecated methods
getId()
getId()
Deprecated. This function is deprecated and should not be used in new scripts.
Returns the id that has been assigned to this object.
This can be used in conjunction with app.getElementById() to retrieve a reference to this object.
Return
String
— the id that has been assigned to this object
getTag()
getTag()
Deprecated. This function is deprecated and should not be used in new scripts.
Gets the text tag of this
.Handler
Return
String
— the text tag.
getType()
getType()
Deprecated. This function is deprecated and should not be used in new scripts.
Gets the type of this object.
Return
String
— the object type
setId(id)
setId(id)
setTag(tag)
setTag(tag)
validateEmail(widget)
validateEmail(widget)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value is a valid email address.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
Return
validateInteger(widget)
validateInteger(widget)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value can be interpreted as an integer.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
Return
validateLength(widget, min, max)
validateLength(widget, min, max)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value is a string whose length is between min and max.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
min | Integer | the minimum length. If null, no minimum is enforced. |
max | Integer | the maximum length. If null, no maximum is enforced. |
Return
validateMatches(widget, pattern)
validateMatches(widget, pattern)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value matches this regular expression.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
pattern | String | the regex to test, as a string. |
Return
validateMatches(widget, pattern, flags)
validateMatches(widget, pattern, flags)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value matches this regular expression.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
pattern | String | the regex to test, as a string. |
flags | String | regex flags. The only valid characters in this string are 'g', 'm', and 'i'. |
Return
validateNotEmail(widget)
validateNotEmail(widget)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value is not a valid email address.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
Return
validateNotInteger(widget)
validateNotInteger(widget)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value cannot be interpreted as an integer.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
Return
validateNotLength(widget, min, max)
validateNotLength(widget, min, max)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value is a string whose length is less than min or greater than max.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
min | Integer | the minimum length. If null, no minimum is enforced. |
max | Integer | the maximum length. If null, no maximum is enforced. |
Return
validateNotMatches(widget, pattern)
validateNotMatches(widget, pattern)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value does not match this regular expression.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
pattern | String | the regex to test, as a string. |
Return
validateNotMatches(widget, pattern, flags)
validateNotMatches(widget, pattern, flags)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value does not match this regular expression.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
pattern | String | the regex to test, as a string. |
flags | String | regex flags. The only valid characters in this string are 'g', 'm', and 'i'. |
Return
validateNotNumber(widget)
validateNotNumber(widget)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value cannot be interpreted as an number.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
Return
validateNotOptions(widget, options)
validateNotOptions(widget, options)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value is not one of the strings given in the options parameter.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
options | String[] | the list of unacceptable values |
Return
validateNotRange(widget, min, max)
validateNotRange(widget, min, max)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value cannot be interpreted as a number that is between min and max.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
min | Number | the minimum length. If null, no minimum is enforced. |
max | Number | the maximum length. If null, no maximum is enforced. |
Return
validateNotSum(widgets, sum)
validateNotSum(widgets, sum)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widgets have values that are not numbers, or that do not sum up to the given value.
This will cause an error if any of the widgets do not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widgets |
| an array of the widgets to validate on. |
sum | Integer | the sum to validate with |
Return
validateNumber(widget)
validateNumber(widget)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value can be interpreted as a number.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
Return
validateOptions(widget, options)
validateOptions(widget, options)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value is one of the strings given in the options parameter.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
options | String[] | the list of acceptable values |
Return
validateRange(widget, min, max)
validateRange(widget, min, max)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widget's value can be interpreted as a number and is between min and max.
This will cause an error if the widget does not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widget |
| the widget to validate on. |
min | Number | the minimum length. If null, no minimum is enforced. |
max | Number | the maximum length. If null, no maximum is enforced. |
Return
validateSum(widgets, sum)
validateSum(widgets, sum)
Deprecated. This function is deprecated and should not be used in new scripts.
Sets this handler to fire only if the given widgets have values that are numbers and sum up to the given value.
This will cause an error if any of the widgets do not have a text property.
Parameters
Name | Type | Description |
---|---|---|
widgets |
| an array of the widgets to validate on. |
sum | Integer | the sum to validate with |