Example
The postcode
field in a content type definition
contains a viz:updateservice
element referencing a
check-postcode
service:
<content-type name="review"> ... <panel name="address"> ... <field type="basic" name="postcode"> <viz:updateservice href="/webservice/check-postcode"/> </field> ... </panel> ... </content-type>
When the postcode field is modified, Content Studio
POST
s the content item as a payload document to
/webservice/check-postcode
:
<payload xmlns="http://www.vizrt.com/types"> ... <field name="postcode"> <value>XYZ</value> </field> ... </payload>
The check-postcode
service checks the content
of the postcode
field, finds that it is invalid and
returns an error message in a vdf:annotation
tip
attribute:
<payload xmlns="http://www.vizrt.com/types"> ... <field name="postcode"> <annotation tip="Cannot find the postcode 'XYZ'."/> <value>XYZ</value> </field> ... </payload>
Content Studio sets this message as a tooltip for the field.