<dataScope xmlns="http://xmlns.oracle.com/cabo/marlin"
           xmlns:baja="http://xmlns.oracle.com/cabo/baja"
           xmlns:data="http://xmlns.oracle.com/cabo/marlin"
           xmlns:html="http://www.w3.org/TR/REC-html40">
 <contents>
 <tableLayout width="80%" cellSpacing = "25" >
  <contents>
    <rowLayout>
     <contents>
      <table name="granteePerm" 
             width="100%"
             data:columnHeaderData="cols@permissionTable"
             data:columnFormats="colFormats@permissionTable"
             data:tableData="rows@permissionList"
             data:alternateText="NO_DATA_FOUND@nls" 
             formSubmitted="true" > 

        <columnHeaderStamp>
          <boundText select="field" />
        </columnHeaderStamp>

        <columnFooter>
         <rowLayout>
          <contents>
           <spacer width="10" />
           <submitButton data:text="BUTTON_ADD_PERMISSION@nls" 
                         baja:event="AddPermRow" />
<!--
           <spacer width="20" />
           <checkBox name ="inputTypeCheck"
                     value="true"
                     data:checked="isDefault"
                     data:text="CUSTOM@nls" /> 
-->
         </contents>
         </rowLayout>
        </columnFooter>

        <tableSelection>
          <singleSelection selectedIndex="0" 
                           data:text="PERMS@nls">
 
           <contents>
            <submitButton data:text="BUTTON_REMOVE@nls" 
                          baja:event="RemoveNewPermission" />
           </contents>
          </singleSelection>
        </tableSelection>

        <contents>
         <switcher data:childName="componentType" childName="choiceType">
          <case name="choiceType">
          <choice name="permClass"
                  data:selectedValue="permClass"
                  onChange="submitForm(granteePerm, true, {event:'PermClassChange', source:this.name})" > 
           <contents data:childData="typeList">
            <option data:text="permClassName" data:value="permClassName"/>
           </contents>
          </choice>
          </case>

          <case name="textInputType">
           <textInput name="permClass" 
                      columns="44" 
                      data:text="permClass" />
          </case>
         </switcher>

         <switcher data:childName="componentType" childName="choiceType">
          <case name="choiceType">
          <choice name="permTarget" 
                  data:selectedValue="permTarget">
            <contents  data:childData="tgtList">
             <option data:text="tgtName" data:value="tgtName" /> 
            </contents>
          </choice>
          </case>
          <case name="textInputType">
           <textInput name="permTarget" 
                      columns="30" 
                      data:text="permTarget" />
          </case>          
         </switcher>

         <switcher data:childName="componentType" childName="choiceType">
          <case name="choiceType">
           <rowLayout>
           <contents>
           <choice name="permAction" 
                   data:selectedValue="permAction">
            <contents  data:childData="actList">
             <option data:text="actNames" data:value="actNames" />
            </contents>
           </choice>
           <formValue baja:event="" />
           </contents>
           </rowLayout>
          </case>
          <case name="textInputType">
           <textInput name="permAction" 
                      columns="30" 
                      data:text="permAction" />
 
          </case>
        </switcher> 
       </contents>

      </table>
     </contents>
    </rowLayout>
  </contents>
  </tableLayout>

 </contents>
</dataScope>