Versions Compared

Key

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

...

Before you can edit an entity there are some criteria that need to be met, firstly the .

The entity id must be unique within a spatial table.
If  If an entity is composed of multiple spatial tables then it may be the case that the id may not be unique across all of the tables, if . If for example the entity is composed of more than one geometry type and the underlying spatial engine (e.g. ArcSDE, shapefiles) doesn't does not support different geometries in a single table, then the geometry would need to be spread over more than one table. In this situation the entity id would have to be the same in all of the spatial tables, but it must at least be unique within each table, this . This is the only way that Weave can determine which row in the table that it needs to update (it as Weave determines which spatial table to update based on the geometry type stored in the spatial table).

For The editing of multiple spatial tables are only fully supported when a different geometry type is stored in each table. That is, if an entity is linked to more than one spatial table then each spatial table should contain a different geometry type (point, line or polygon), this . This is so that Weave knows which table to write the appropriate geometries to, for . For example if you were to have an entity linked to two spatial tables, both containing polygon geometry, then when an edit was is submitted than that contains a polygon, Weave would not know which table the geometry was supposed to be added to or updated in.

Also, note that in the case of an entity represented by multiple spatial tables, the schemas for the tables should all be the same, as . This is a requirement because the same attribute values will be written to each table when an edit is submitted that contains different geometry types.

Additionally, at this stage spatial engines that don't do not differentiate between geometry types, (i.e. the spatial table stores "geometry" and not specifically points, lines or polygons, ) are not currently support in multi table configurations. This is because in these cases, since Weave can not determine which table to write the geometry to (they are supported in single table configurations). This may change in the future.

...

Before an entity can be edited it must have at least one edit configuration associated with it. The edit configuration enables editing for the particular entity and also allows for overriding the details about the way the user can edit the entity, for example .  Examples are what attributes the user can edit , and or how the attributes are presented to the user, etc.

Info

You can have multiple edits associated with each entity, the . The user will be able to choose which edit to perform by selecting from a list.

...

The most basic edit configuration interrogates the underlying spatial tables for the information it requires, for example . (e.g. to determine what attributes are associated with the entity has associated with it or what spatial geometries (point, line or polygon) the user is allowed to create.

...

Code Block
xml
xml
titleDrop down list example
linenumberstrue
  <edit:config id="custom.edit">
    <entity>graffiti</entity>
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="id">
      <hidden>true</hidden>
      <column>ID</column>
      <value>nextval()</value>
    </parameter>
    <parameter id="description">
      <label>Description</label>
      <controlType>text-area</controlType>
      <column>DESCRIPTION</column>
    </parameter>
    <parameter id="status">
      <label>Status</label>
      <controlType>list-box</controlType>
      <column>STATUS</column>
      <defaultValue>N</defaultValue>
      <list value="N" label="New"/>
      <list value="V" label="Verified"/>
      <list value="S" label="Scheduled"/>
      <list value="R" label="Removed"/>
    </parameter>
    <parameter id="reporter">
      <label>Reporter</label>
      <controlType>list-box</controlType>
      <dataSet>staff</dataSet>
      <allowNewValues>true</allowNewValues>
      <column>REPORTEDBY</column>
    </parameter>
  </edit:config>

...

Check Boxes and Radio Buttons
Code Block
xml
xml
titleCheck box and radio button example
linenumberstrue
  <edit:config id="custom.edit">
    <entity>graffiti</entity>
    <label>Grafitti</label>
    <description>Report graffiti for removal</description>
    <geometry>
      <point minimum="1" maximum="1"/>
    </geometry>
    <parameter id="id">
      <hidden>true</hidden>
      <column>ID</column>
      <value>nextval()</value>
    </parameter>
    <parameter id="checkbox">
      <label>Check Box</label>
      <controlType>checkbox</controlType>
      <column>CHECKBOX</column>
      <trueValue>Y</trueValue>
      <falseValue xsi:nil="true"/>
    </parameter>
    <parameter id="radiobutton">
      <label>Radio Button</label>
      <controlType>radiobutton</controlType>
      <column>RADIOBUTTON</column>
      <defaultValue>value2</defaultValue>
      <list>
        <label>Label 1</label>
        <value>value1</value>
      </list>
      <list>
        <label>Label 2</label>
        <value>value2</value>
      </list>
      <list>
        <label>Label 3</label>
        <value>value3</value>
      </list>
    </parameter>
  </edit:config>

...

Writing to other tables

Note

Currently only writing new records to a separate database table is supported, that is you can not currently update an existing record in an external database table.

...