gws.plugin.model_value.static

Static value.

Returns a fixed configured value. Often used with isDefault to provide a default for new features, or as a bound of a range validator.

Example:

fields+ {
    name "status"
    type "text"
    values+ { type "static" value "new" isDefault true forRead false }
}

Source code: gws.plugin.model_value.static

Package Contents

class gws.plugin.model_value.static.Config

Bases: gws.base.model.value.Config

Fixed value.

value: Any

Static value to return.

class gws.plugin.model_value.static.Object

Bases: gws.base.model.value.Object

Static value object.

compute(field, feature, mc)