You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

Enum Property

An Enum Property can hold a single string value from a list of pre-defined values.

An Enum Property

Details

The possible values of an enum property are specified in the Format/Code field of the property. The values have to be provided as a comma-separated list.

Note

Because Structr dynamically creates Java code from the format definition, the following limitations apply:

  • Enum-values must be simple alpha-numeric strings (i.e. no special characters, no spaces, etc)
  • Reserved words (like “boolean”, “final”, etc) are not allowed

This is not enforced by Structr but by Java itself as curating a comprehensive blacklist would not be feasible.

JSON Output
{
	"query_time": "0.000897187",
	"result_count": 1,
	"result": {
		"status": "active"
	},
   	"serialization_time": "0.000051543"
}

Search results for "Enum Property"

Enum Property

The possible values of an Enum Property are defined in the schema/code area in the Format/Code field of the property. The values have to be provided as a comma-separated list.

Because Structr dynamically creates Java code from the format definition, the following limitations apply:

  • Enum-values must be simple alpha-numeric strings (i.e. no special characters, no spaces, etc)
  • Reserved words (like “boolean”, “final”, etc) are not allowed

This is not enforced by Structr but by Java itself as curating a comprehensive blacklist would not be feasible.

Schema Errors