若要配置標籤,使其在內容區域中包含導覽列,則必須在標籤的導覽元素中併入導覽列配置的 id。定義導覽列顯示 Person.tab 的已修改版本。
<tc:tab-config
id="SimplePerson">
<tc:page-param name="personID"/>
<tc:context page-id="SimplePersonContext" height="60"/>
<tc:navigation id="SimplePersonNav"/>
</tc:tab-config>
導覽列配置本身是使用副檔名為 .nav 的 XML 配置檔所定義。與其他標籤配置構件相同,.nav 檔案位於 EJBServer\components\<component-name>\clientapps 目錄中,其中 <component-name> 是自訂元件。
定義導覽列顯示 SimplePersonNav.nav 的內容。它會定義一個含有兩個導覽頁面的導覽群組。
<nc:navigation id="SimplePersonNav">
<nc:nodes>
<nc:navigation-group id="PersonHome" title="PersonHome"
description="Person Details Group">
<nc:navigation-page id="SimplePerson" page-id="SimplePerson"
title="PersonDetails.Title"/>
<nc:navigation-page id="Employments" page-id="Employments"
title="EmploymentHistory.Title"/>
</nc:navigation-group>
</nc:nodes>
</nc:navigation>
對應的 .properties 應該包含頁面的可本地化內容:
PersonHome.Title=Person Home EmploymentHistory.Title=Employment History PersonDetails.Title=Person Details