initServices();
initConstants();
String uniqueForumID = getParam("uniqueForumID");
ForumBootstrap bootstrapped = (ForumBootstrap) getBootstrapped();
VerticalPanel mainPanel = new VerticalPanel();
mainPanel.setStylePrimaryName("Forum");
forumDisplay = new ForumDisplay(this);
mainPanel.add(forumDisplay);
show(mainPanel);
String initToken = History.getToken();
if (initToken.length() == 0 && uniqueForumID != null) {
initToken = uniqueForumID;
History.newItem(initToken);
}
ForumCommand fc = ForumCommand.getFromLocation();
// prioritize this over uniqueID
// used when we've forwarded to /secure/
if (fc != null) {
Log.info("Forum Processing From Location " + fc);
process(fc);
} else if (bootstrapped != null) {
Log.info("ForumApp Running off Bootstrap");
load(0, bootstrapped.getPostsList(), false, bootstrapped
.getForumTopic(), FORUM_POST_MAX, false);
History.newItem(bootstrapped.getForumTopic()
.getUniqueForumID());
} else if (initToken.length() > 0) {
Log.info("ForumApp token:" + initToken);
// onHistoryChanged() is not called when the application first