* @exception Exception, a generic exception.
*/
public void doBuild( RunData data )
throws Exception
{
ParameterParser params = data.getParameters();
String fmScreen = params.getString("template");
params.add("template", "navigations/default_top.html");
// Execute the Top Navigation portion for this Layout.
ConcreteElement topNav =
ScreenLoader.getInstance().eval ( data, "FreeMarkerScreen" );
if ( topNav != null)
{
data.getPage().getBody().addElement( topNav );
}
// If an Action has defined a message, attempt to display it
// here.
if ( data.getMessage() != null )
{
data.getPage().getBody()
.addElement(new P())
.addElement(
new Font().setColor(HtmlColor.red)
.addElement(data.getMessageAsHTML()));
}
params.add("template", "screens/" + fmScreen);
// Now execute the Screen portion of the page.
ConcreteElement screen = ScreenLoader.getInstance().eval(
data, data.getScreen() );
if (screen != null)
data.getPage().getBody().addElement( screen );
// The screen should have attempted to set a Title for itself,
// otherwise, a default title is set.
data.getPage().getTitle().addElement(data.getTitle());
// The screen should have attempted to set a Body bgcolor for
// itself, otherwise, a default body bgcolor is set.
data.getPage().getBody().setBgColor(HtmlColor.white);
// Execute the Bottom Navigation portion for this Layout.
params.add("template", "navigations/default_bottom.html");
ConcreteElement bottomNav =
ScreenLoader.getInstance().eval ( data, "FreeMarkerScreen" );
if ( bottomNav != null)
{