Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The spatial editing extension for Weave provides a means to edit geometry and attributes for an entity.

...

Name

Type

Required

Default

Description

id

string

yes


A unique identifier for the parameter

label

string

yes


The prompt text displayed when user input the parameter value

column

string

no


The name of the column within the table that this parameter references

helptext

string

no


Additional text to display for the parameter to explain how to use the parameter

hidden

boolean

no

false

Hides the parameter from the parameter UI

alignment

'left', 'center', 'right', 'auto'

no

'auto'

How the items should appear in the UI

controltype

'listbox', 'checkbox', 'radiobutton', 'textbox' or 'textarea'

no

'textbox'

The suggested type of UI control to use when displaying the parameter

datatype

'any', 'date', 'time', 'datetime', 'integer', 'string'

no

'string'

The data type for the parameter

allownull

boolean

no

false

Whether a null value is allowed for this parameter

allowblank

boolean

no

true

Give the user the choice of an empty value in the listbox (as opposed to a null value)

allownewvalues

boolean

no

false

Allow the user to enter values not in the listbox already

defaultvalue

any

no


The default value of the parameter

dataset

ref urn:com.cohga.server.data.database#1.0:datadefinition

no


Where to get the values for a listbox

labelcolumn

string

no


Column in the datadefinition that supplies the label of the value to show the user

valuecolumn

string

no


Column in the datadefinition that supplies the value of the value to use in the SQL

uppercase

boolean

no

false

Should the value be converted to upper case in the generated SQL

readonly

boolean

no

false

Can the user change the value

readonlyoninsert

boolean

no

false

Can the user change the value when a new entity is being created

readonlyonupdate

boolean

no

false

Can the user change the value when an entity is being edited

updatable

boolean

no

true

Can the underlying value ever be changed once set (implied readonlyonupdate if set to true)

value

any

formula or any


A value to insert into the database, provides a means of creating values beyond what the user enters (implied readonly if set

persistedbooleannofalseShould the value the user chooses for the field become the default value for the field?
minvalueanyno
The minimum value allowed for a field. Available from 2.5.28.
maxvalueanyno
The maximum value allowed for a field. Available from 2.5.28.
minlengthintegerno
The minimum length allowed for a field. Available from 2.5.28.
maxlengthintegerno
The maximum length allowed for a field. Available from 2.5.28.
incrementintegerno
The increment to use for fields that support it, the units are dependant upon the field type. Available from 2.5.28 and currently only for time fields.

A few things to not about the properties that can be applied to parameters:

  • column is optional, if not provided then the field will still appear, but an attempt to write the entered value into the underlying spatial table will not be made. The user entered value can still be used by other means that will be covered later.
  • The controltype now supports 'textarea' which isn't available for search fields, it provides a multi-line text input field.
  • readonly, readonlyoninsert and readonlyonupdate aren't available for search field either, they're special markers that allow you to alter the ability of the user to change the value in a field. These are client-side flags, and if set alters the display of the field so that the user cannot change the value, the field is still displayed, just not editable.
  • updatable specifies that one a value is set it can't be changed, this is similar to readonlyonupdate, and in fact readonlyonupdate will be set to true if updatable is set to false, but it also provides additional checks on the server to ensure that the value is not updated.
  • value can be used to set a value explicitly by directly supplying the value, or there are a number of formulas that are available.
    • entity() The name of the entity type being edited.
    • userid() The current username.
    • ip() The current users IP address.
    • datetime() The current date/time.
    • operation() The type of operation being performed will be one of the strings 'create', 'update' or 'delete'.
    • nextval() The value used for the column will be the previous largest value from the column plus one, the underlying column must be numeric.
    • geometry() A WKT (Well Known Text) representation of the geometry if available, otherwise null.
    • id() The value for the key field for the spatial table will be used if available, otherwise null.
    • auto() The value for the field is auto-generated by the database.
    • count() The number of geometry objects.
    • area() The area of the geometry.
    • length() The length of the geometry.
    • guid() Generate a new globally unique id.


Note

When geometry is being written to multiple spatial tables the count(), area() and length() functions will behave differently when used in an edit config item versus an edit audit item.
The value will only contain the count, area and length for the geometries that match the table that the geometry is being written to, not the total, when used in an edit config item. But, when used in audit config item then count, area and length will be the total of all the geometries (if there are more than one).

...