コード・サンプル・アイコン ページ・テンプレート全体のサンプル・コード

ページ・テンプレートの最終的なコードは、次のようになります。

<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
 <jsp:directive.page contentType="text/html;charset=windows-1252"/>
 <af:pageTemplateDef var="attrs">
  <af:panelStretchLayout id="ptpsl1">
   <f:facet name="bottom"/>
   <f:facet name="center">
    <af:decorativeBox id="ptdb1">
     <f:facet name="center">
      <af:decorativeBox id="ptdb2">
       <f:facet name="center">
        <af:decorativeBox id="ptdb3">
         <f:facet name="center">
          <af:panelSplitter id="ptps1">
           <f:facet name="first">
            <af:navigationPane id="ptnp4" hint="list" level="3"
                               value="#{root_menu}" var="menuInfo">
             <f:facet name="nodeStamp">
              <af:commandNavigationItem text="#{menuInfo.label}"
                                        id="ptcni5"
                                        icon="#{menuInfo.icon}"
                                        destination="#{menuInfo.destination}"
                                        action="#{menuInfo.doAction}"/>
             </f:facet>
            </af:navigationPane>
           </f:facet>
           <f:facet name="second">
            <af:facetRef facetName="body"/>
           </f:facet>
          </af:panelSplitter>
         </f:facet>
         <f:facet name="top">
          <af:breadCrumbs id="ptbc1" value="#{root_menu}"
                          var="menuInfo">
           <f:facet name="nodeStamp">
            <af:commandNavigationItem text="#{menuInfo.label}"
                                      id="ptcni4"
                                      icon="#{menuInfo.icon}"
                                      destination="#{menuInfo.destination}"
                                      action="#{menuInfo.doAction}"/>
           </f:facet>
          </af:breadCrumbs>
         </f:facet>
        </af:decorativeBox>
       </f:facet>
       <f:facet name="top">
        <af:navigationPane id="ptnp3" hint="tabs" level="2"
                           value="#{root_menu}" var="menuInfo">
         <f:facet name="nodeStamp">
          <af:commandNavigationItem text="#{menuInfo.label}"
                                    id="ptcni3"
                                    icon="#{menuInfo.icon}"
                                    destination="#{menuInfo.destination}"
                                    action="#{menuInfo.doAction}"/>
         </f:facet>
        </af:navigationPane>
       </f:facet> 
     </af:decorativeBox>
     </f:facet>
     <f:facet name="top">
      <af:navigationPane id="ptnp2" hint="tabs" level="1"
                         var="menuInfo" value="#{root_menu}">
       <f:facet name="nodeStamp">
        <af:commandNavigationItem text="#{menuInfo.label}"
                                  id="ptcni2"
                                  icon="#{menuInfo.icon}"
                                  destination="#{menuInfo.destination}"
                                  action="#{menuInfo.doAction}"/>
         </f:facet>
        </af:navigationPane>
       </f:facet>
      </af:decorativeBox>
     </f:facet>
     <f:facet name="start"/>
     <f:facet name="end"/>
     <f:facet name="top">
      <af:panelHeader text="ADF Menu Example" id="ptph1">
     <f:facet name="context"/>
     <f:facet name="menuBar">
      <af:navigationPane id="ptnp1" hint="buttons" level="0"
                         var="menuInfo" value="#{root_menu}">
       <f:facet name="nodeStamp">
        <af:commandNavigationItem text="#{menuInfo.label}"
                                  id="ptcni1"
                                  icon="#{menuInfo.icon}"
                                  destination="#{menuInfo.destination}"
                                  action="#{menuInfo.doAction}"/>
        </f:facet>
      </af:navigationPane>
     </f:facet>
     <f:facet name="toolbar"/>
     <f:facet name="legend"/>
     <f:facet name="info"/>
    </af:panelHeader>
   </f:facet>
  </af:panelStretchLayout>
  <af:xmlContent>
   <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component">
    <display-name>myTemplate</display-name>
    <facet>
     <facet-name>body</facet-name>
    </facet>
   </component>
  </af:xmlContent>
 </af:pageTemplateDef>
</jsp:root>

このウィンドウのコード全体をコピーして、XMLソース・エディタに貼り付けることができます。

コードを貼り付けた後は、エディタを右クリックして「再フォーマット」を選択します。