<?xml version="1.0" encoding="UTF-8"?>
<otrunk id="33754150-b594-11d9-9669-0800200c9a66" >
  <imports>
    <import class="org.concord.otrunk.OTSystem"/>
    <import class="org.concord.otrunk.view.OTFolderObject"/>
    <import class="org.concord.otrunk.view.OTViewEntry"/>
    <import class="org.concord.otrunk.view.OTViewService"/>
    <import class="org.concord.otrunk.view.prototype.OTPrototypeViewEntry"/>
    <import class="org.concord.otrunk.view.prototype.OTPrototypeEventController"/>
    <import class="org.concord.otrunk.view.prototype.OTPrototypeMapEntry"/>
    <import class="org.concord.otrunk.view.prototype.OTPropertyReference"/>
    <import class="org.concord.otrunk.ui.OTButton"/>
    <import class="org.concord.framework.otrunk.view.OTFrame"/>
    <import class="org.concord.otrunk.ui.OTText"/>
    <import class="org.concord.otrunk.view.document.OTCompoundDoc"/>
    <import class="org.concord.otrunk.velocity.OTVelocityXHTMLViewEntry"/>
    
  </imports>
  <objects>
    <OTSystem>
      <services>
        <OTViewService>
          <viewEntries>
            <OTViewEntry local_id="text_edit"
              objectClass="org.concord.otrunk.ui.OTText" 
              viewClass="org.concord.otrunk.ui.swing.OTTextEditView"/>
            <OTViewEntry
              objectClass="org.concord.otrunk.ui.OTButton"
              viewClass="org.concord.otrunk.ui.swing.OTButtonView"/>
            
            <OTPrototypeViewEntry 
            	objectClass="org.concord.otrunk.view.prototype.OTPropertyReference"
            	viewClass="org.concord.otrunk.view.prototype.OTPrototypePropertyView"
            	viewEntry="${text_edit}">
            	<prototype>
            		<OTText text="default" />
            	</prototype>
            	<controller>
            		<OTPrototypeEventController>
            			<mapping>
            			   <OTPrototypeMapEntry prototypeProperty="text"/>
            			</mapping>
            		</OTPrototypeEventController>
            	</controller>
            </OTPrototypeViewEntry>

            <OTViewEntry local_id="document_view"
              objectClass="org.concord.otrunk.view.document.OTDocument" 
              viewClass="org.concord.otrunk.view.document.OTDocumentView"/>                         
          </viewEntries>
        </OTViewService>
      </services>
      <root>
        <OTCompoundDoc name="root">
          <bodyText>
            An example of using a hard coded document to edit a particular instance of an Object.
   		  </bodyText>   		  
   		  <children>
   		    <OTCompoundDoc name="button editor">
   		      <bodyText>
   		        Name: button name Text: Click Me
                <table>
                <tr><td>Name: </td>
                    <td><object refid="${name_ref}"/></td> 
                </tr>
                <tr><td>Text: </td>
                    <td><object refid="${text_ref}"/></td>
                </tr>                
                </table>
                <object refid="${button}"/>   		      
   		      </bodyText>
   		      <documentRefs>
   		        <OTPropertyReference local_id="name_ref" property="name" reference="${button}"/>
   		        <OTPropertyReference local_id="text_ref" property="text" reference="${button}"/>
   		      </documentRefs>
   		    </OTCompoundDoc>
   		    <OTButton local_id="button" name="button name" text="Click Me"/>
   		  </children>
   	    </OTCompoundDoc>
      </root>
    </OTSystem>
  </objects>
</otrunk>
