Except as otherwise noted,
the content of this page is licensed under the Creative Commons
Attribution 2.5 License.
Base interface for all enum objects. This class allows containers to use constants for fields that are usually have a common set of values. There are two main ways to use this class.
If your gadget just wants to display how much of a smoker someone is, it can simply use:
html = "This person smokes: " + person.getField('smoker').getValue();
This value field will be correctly set up by the container. This is a place where the container can even localize the value for the gadget so that it always shows the right thing.
If your gadget wants to have some logic around the smoker field it can use:
if (person.getField('smoker').getKey() != "NO") { //gadget logic here }
Note: The key may be null if the person's smoker field cannot be coerced into one of the standard enum types. The value, on the other hand, is never null.
String
getDisplayValue()
String
getKey()
String getDisplayValue()
String The enum's value.
String getKey()
String The enum's key. This should be one of the defined enums
below.