Adjusting the controller configuration

Now, that we defined our panels and implemented the corresponding templates. we have to tell the controller to use them. This is done by loading the Calyxo Panels plugin.

In /WEB-INF/calyxo-control-config-outside.xml and /WEB-INF/calyxo-control-config-inside.xml we have to change occurrences of .jspx to .page and add a <plugin> element to load the panels plugin. Here's the modified /WEB-INF/calyxo-control-config-outside.xml:

<calyxo-control-config version="0.9"
  xmlns="http://calyxo.odysseus.de/xml/ns/control">

  <plugins>

    <!-- Install panels dispatcher as global dispatcher -->
    <plugin class="de.odysseus.calyxo.panels.control.PanelsPlugin">
      <param name="config" value="/WEB-INF/calyxo-panels-config-outside.xml"/>
      <param name="global" value="true"/>
    </plugin>

  </plugins>

  <actions>

    <!-- The index action just forwards to our login page -->
    <action path="/index">
      <dispatch path="/login.page"/>
    </action>

    <!-- This action shows the goodbye page -->
    <action path="/goodbye" target="default">
      <dispatch path="/goodbye.page"/>
    </action>

    <!-- Login action -->
    <action path="/login" class="de.odysseus.calyxo.sample.login.LoginAction">
      <dispatch name="success" module="inside" action="/index"/>
      <dispatch name="input" path="/login.page"/>
    </action>

  </actions>

</calyxo-control-config>

The global parameter tells the plugin to install itself as the default dispatcher for that module. However, you can define a different dispatcher for an action or even for a single dispatch element.

Make analog changes to /WEB-INF/calyxo-panels-config-inside.xml and - you're done!
Well, almost...