This page last changed on Jun 17, 2008 by scytacki.

OTrunk view modes allow you to override a default view of an OTObject. This form of overriding is used to provide different "views" of parts of the application. For example it is used to provide a authoring view of some objects.

Here is a simple example of configuring the OTViewBundle with a authoring view mode for a OTText object.

    <OTViewEntry local_id="text-view" 
        objectClass="org.concord.otrunk.ui.OTText" viewClass="org.concord.otrunk.ui.swing.OTTextView"/>
    <OTViewMode name="authoring">
        <entry key="${text-view}">
          <OTViewEntry objectClass="org.concord.otrunk.ui.OTText" viewClass="org.concord.otrunk.ui.swing.OTTextEditView"/> 
      < map>

In this case you define the default OTViewEntry in the OTViewBundle.viewEntries element. And then define an OTViewMode in the OTViewBundle.modes element. Inside the element you need to put an
"entry" element with a "key" attribute pointing to the id of the default OTViewEntry.
Then inside of the entry element put the OTViewEntry which should replace the default OTViewEntry when that particular OTViewMode is activated.

So you can use view modes to group a set of overriding views together. And then turn them activate them all on at once.

Document generated by Confluence on Jan 27, 2014 16:52