* @exception Exception a generic exception.
*/
public void doBuild(RunData data) throws Exception
{
// Execute the Top Navigation portion for this Layout.
ConcreteElement topNav = NavigationLoader.getInstance()
.eval(data, "DefaultTopNavigation");
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()));
}
// 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.
ConcreteElement bottomNav = NavigationLoader.getInstance().eval(data,
"DefaultBottomNavigation");
if (bottomNav != null)
{
data.getPage().getBody().addElement(bottomNav);