close

Filter

loading table of contents...

Site Manager Developer Manual / Version 2304

Table Of Contents

5.2.10 Example Configuration of the Document Window

With the help of the editor.xml file you can define the fields of a document type which should be displayed in the document window.

You can configure the following settings:

  • Which fields are displayed?

  • Which fields can be edited?

  • Which fields must be filled?

  • How is the content of a field displayed?

  • The initial values of the fields of a newly created document.

  • How the content of a field is validated at check in.

The configuration possibilities are shown using a document of type Dish. The following figure shows such a document without specially configured fields (a Dish document type could of course have completely different fields in your system, or not occur at all). The document has no fields of type blob and integer. However, the configuration of these fields can be carried out analogously to the configuration shown. The editors for these two field types can be found in Section 5.1.1, “Property Editors”.

Dish document without special configuration

Figure 5.4. Dish document without special configuration


The fields of the document type Dish should now be configured as follows:

  • Pictures

  • A selection list should be presented here.

  • Description

  • This field must be filled, since it is necessary for a dish.

  • price

  • Three different prices should be made available for selection here.

  • name

  • This field should be filled with the initial value "New Dish".

  • calories

  • This field should only be displayed and filled with the initial value "200".

Once the configuration has been carried out, a document of type Dish appears as follows:

Dish document after the configuration

Figure 5.5. Dish document after the configuration


One of the two list fields is opened up here as example. If you try to save this document without entries in the fields description, an error message appears. An entry in the field calories is not possible. The field name has the default entry "New Dish". You achieve this configuration with the following settings in editor.xml:

 <Documents>
.
.
	<Document type="Dish">
		<Property name="pictures" editorClass="ComboBoxLinkListEditor" 
		path="/MenuSite/Fish"/>
		<Property name="calories" editable="false"/>
		<Property name="price" editorClass="ComboBoxStringEditor">
			<HistoryItem value="5$"/>
			<HistoryItem value="10$"/>
			<HistoryItem value="20$"/>
		</Property>
	</Document>
</Documents>

<DocumentTypes>
	<DocumentType name="Dish">
		<PropertyType name="description">
			<Validator class="NotEmpty2"/>
		</PropertyType>
		<PropertyType name="name" initialValue="New Dish"/>
		<PropertyType name="calories" initialValue="200"/>
	</DocumentType>
</DocumentTypes>

Example 5.63. Code example for configuration of the editor


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.