\n");
out.write("\n");
// The top content is a JSP page, so include it here.
rdat.setRequestAttribute(ATTR_NAME,this);
RequestDispatcher dispatcher = ctxt.getRequestDispatcher(rdat.getFormatJSPPath("top_content.jsp"));
out.flush();
rdat.flushOutput(); // make sure the stuff to be output first is output
try
{ // include me!
rdat.includeDispatch(dispatcher);
} // end try
catch (ServletException se)
{ // since we can't throw ServletException, we throw IOException
throw new IOException("Failure including top_content.jsp");
} // end catch
rdat.flushOutput(); // now make sure the included page is properly flushed
out.write(" | \n\n"); // break to the sidebox column
for (int i=0; i"
+ "\n");
out.write(rdat.getStdFontTag(SIDEBOX_TITLE_FOREGROUND,3) + ""
+ StringUtil.encodeHTML(sideboxes[i].getPageTitle(rdat)) + "\n");
out.write(" | \n");
// Fill in the sidebox by calling down to the base.
if (sideboxes[i] instanceof ContentRender)
{ // we have a direct-rendering component here - do it
ContentRender cr = (ContentRender)(sideboxes[i]);
cr.renderHere(out,rdat);
} // end if
else if (sideboxes[i] instanceof JSPRender)
{ // we have a JSP rendering component here - bounce to the appropriate JSP file
JSPRender jr = (JSPRender)(sideboxes[i]);
rdat.storeJSPRender(jr);
dispatcher = ctxt.getRequestDispatcher(rdat.getFormatJSPPath(jr.getTargetJSPName()));
out.flush();
rdat.flushOutput(); // make sure the stuff to be output first is output
try
{ // include me!
rdat.includeDispatch(dispatcher);
} // end try
catch (ServletException se)
{ // since we can't throw ServletException, we throw IOException
out.write(rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,2) + "failure rendering class "
+ sideboxes[i].getClass().getName() + ": " + StringUtil.encodeHTML(se.getMessage())
+ "\n");
out.flush();
} // end catch
rdat.flushOutput(); // now make sure the included page is properly flushed
} // end else if
else // this is bogus - just display a little error here
out.write(rdat.getStdFontTag(SIDEBOX_CONTENT_FOREGROUND,2) + "cannot display sidebox of class: "
+ sideboxes[i].getClass().getName() + "\n");
// close up the framework of this sidebox
out.write(" | \n");
} // end for
if (uc.isLoggedIn())
{ // write the Configure button below the sideboxes
out.write(" \n");
} // end if
// Finish up.
out.write(" | \n
");
} // end renderHere
/*--------------------------------------------------------------------------------
* External operations
*--------------------------------------------------------------------------------
*/
public static String getPosterName(TopicMessageContext msg)
{
try
{ // have to guard agains a DataException here
return msg.getCreatorName();
} // end try
catch (DataException de)
{ // just return "unknown" on failure
return "(unknown)";
} // end catch
} // end getPosterName
public static String getMessageBodyText(TopicMessageContext msg)
{
try
{ // have to guard against a DataException here
return msg.getBodyText();
} // end try
catch (DataException de)
{ // just return an error message
return "