previous | index | next

Views and Subviews

When included content contains JSF tags, the inclusion must be in an f:subview tag:
   <f:view>
      ...
      <f:subview id="header">
          <c:import url="header.jsp"/>
      </f:subview>
      ...
   </f:view>

JSF views, which are normally web pages, can contain an unlimited number of subviews.

But subviews cannot contain f:view tags; there can be only one top-level view per page.

Here is the book viewer page broken into subviews using content inclusion: book.jsp.

Note that inclusion of bookContent.jsp did not have to be wrapped in an f:subview tag because the file does not have JSF tags.


previous | index | next