Documentation
The
TopicType is the root of the type system of the WikiWorbench. Every
WikiTopic has got one
or more TopicTypes. TopicTypes often correlate with DataForms, where a type indicates the properties
and use of the form being attached to a topic. However, there are also TopicTypes that only
serve more as an additional marker to a generic DataForm being used in different applications.
TopicTypes are able overcome Foswiki's limitation to only allow one form to be attached to a topic.
If you'd like to attach a second form to a topic, create a new DataForm that mixes two others
and indicate this by merging the resulting TopicType properties. This procedure is the recommended
way to derive new TopicTypes from existing ones building on top of them, e.g. by augmenting a
CategorizedTopic with additional formfields.
TopicTypes have a special property that you might use to indicate a special way of
derivation by means of inheritance. There is no real inheritance in Foswiki but the way of thinking
when dealing with objects and types can be clarified this way.
When you start writing a
WikiApplication, first think of the data objects you will need and
create TopicTypes for each. You can double-mark a TopicType being a DataForm implementation
in many cases, but you can also create a separate DataForm topic being distinct from the
TopicType topic.
The
TopicType topic is the factory to create new TopicTypes as well.
Topics of type 'TopicType'
TopicType form
Name: |
Type: |
Size: |
Values: |
Description: |
Attributes: |
TopicType |
checkbox |
4 |
TopicType, DataForm, DocuTopic, ApplicationTopic |
Document type |
|
TopicTitle |
text |
75 |
|
title |
|
Inheritance |
checkbox |
4 |
none, ApplicationLicense, ApplicationTopic, DataForm, DataFormAttribute, DocuTopic, TopicFunction, TopicStub, TopicTemplate, TopicType, TopicView, WebTool, WikiApplication, WikiTopic |
TopicType whose properties are implemented here too (see java's interfaces) |
|
Summary |
text |
75 |
|
Short description of the role of this topic |
c |
WikiApplication |
wikiapp |
1 |
|
Application this topic belongs to |
|