Panel definitions

Panels are defined per module in an XML configuration file. As stated earlier, a panel definition corresponds to a template. The template includes other template corresponding to the subpanels in the definition. In a JSP environment, templates are just JSPs.

Let's make this clear using an example. The panels configuration file may contain a panel definition like this:

<panel name="/base.page" template="/WEB-INF/jsp/layout/page.jsp">
  <panel name="header" template="/WEB-INF/jsp/layout/header.jsp"/>
  <panel name="menu" template="/WEB-INF/jsp/layout/menu.jsp"/>
  <panel name="content"/>
  <panel name="footer" template="/WEB-INF/jsp/layout/footer.jsp"/>
</panel>

The /WEB-INF/jsp/layout/page.jsp template may include a subpanel using the <panel> tag from the custom tag library provided by the Calyxo Panels component like this:

<jsp:root version="2.0"
  xmlns:panels="http://calyxo.odysseus.de/jsp/panels"
  xmlns:jsp="http://java.sun.com/JSP/Page">
  ...
  <panels:panel name="header"/>
  ...
  <panels:panel name="menu"/>
  ...
  <panels:panel name="content"/>
  ...
  <panels:panel name="footer"/>
  ...
</jsp:root>