1 25 26 29 package net.killingar.forum.actions.todo; 30 31 import net.killingar.forum.internal.Todo; 32 import net.killingar.forum.internal.managers.TodoManager; 33 34 public class View extends ActionTodoSupport 35 { 36 38 Todo[] urgent; 40 Todo[] nonUrgent; 41 42 43 45 47 public Todo[] getUrgent() { return urgent; } 49 public Todo[] getNonUrgent() { return nonUrgent; } 50 51 protected String doExecute() 53 { 54 try 55 { 56 TodoManager todoMgr = (TodoManager)manager.getManager(TodoManager.class.getName()); 57 59 urgent = todoMgr.getTodos(1); 60 nonUrgent = todoMgr.getTodos(2); 61 62 java.util.Arrays.sort(urgent); 63 java.util.Arrays.sort(nonUrgent); 64 } 65 catch (Exception e) 66 { 67 e.printStackTrace(); 68 addErrorMessage("executing "+getClass().toString()+" action failed, exception thrown: "+e.toString()); 69 return ERROR; 70 } 71 72 return SUCCESS; 73 } 74 } 75 | Popular Tags |