1 25 26 package net.killingar.forum.actions.user; 27 28 public class View extends net.killingar.forum.actions.ActionForumSupport 29 { 30 32 protected UserData user; 34 protected long userID; 35 36 38 public void setUserID(long in) { userID = in; } 40 41 public UserData getUser() { return user; } 43 public long getUserID() { return userID; } 44 45 protected void doValidation() 47 { 48 if (userID == -1) 50 addErrorMessage("no userID specified"); 51 } 52 53 protected String doExecute() 54 { 55 try 56 { 57 user = new UserData(manager, manager.getUser(userID)); 58 } 59 catch (Exception e) 60 { 61 e.printStackTrace(); 62 addErrorMessage("executing "+getClass().toString()+" action failed, exception thrown: "+e.toString()); 63 return ERROR; 64 } 65 66 return SUCCESS; 67 } 68 69 } 70 | Popular Tags |