1 25 26 package net.killingar.forum.actions.area; 27 28 import net.killingar.forum.internal.managers.AreaManager; 29 30 import java.util.Map ; 31 32 public abstract class ActionAreaSupport extends net.killingar.forum.actions.ActionForumSupport 33 { 34 protected AreaManager areamgr; 35 36 public void setSession(Map map) 37 { 38 super.setSession(map); 39 try 40 { 41 synchronized (map) 42 { 43 areamgr = (AreaManager)manager.getManager(AreaManager.class.getName()); 44 if (areamgr == null) 45 addErrorMessage("failed to initialize area manager, null returned"); 46 47 String foo = optionmgr.get("number of messages per page"); 48 if (foo != null) 49 { 50 areamgr.setMessagesPerPage(Integer.parseInt(foo)); 51 } 52 } 53 } 54 catch (Exception exception) 55 { 56 addErrorMessage("failed to initialize area manager, exception thrown (" + exception.toString() + ")"); 57 exception.printStackTrace(); 58 } 59 } 60 } 61 | Popular Tags |