tdmcginley

Listing.java

May 16th, 2011
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. package actions.survey;
  2.  
  3. import data.*;
  4.  
  5. import java.util.HashMap;
  6. import java.util.List;
  7. import java.util.Map;
  8.  
  9. import com.opensymphony.xwork2.ActionContext;
  10.  
  11. import actions.base.BaseAction;
  12.  
  13. public class Listing extends BaseAction {
  14.  
  15. /**
  16. *
  17. */
  18. private static final long serialVersionUID = -7954410790927568904L;
  19. private List<Forms> forms;
  20. private Forms selectedForm;
  21. private Long formId;
  22.  
  23. public Listing() {
  24. }
  25.  
  26. public String execute() {
  27. selectedForm = services.getFormsById(formId);
  28. return SUCCESS;
  29. }
  30.  
  31. public String display() {
  32. forms = services.getForms();
  33. formId = forms.get(0).getId();
  34. return NONE;
  35. }
  36.  
  37. public String beginQuestions() {
  38. return "redirect";
  39. }
  40.  
  41. public List<Forms> getForms() {
  42. return forms;
  43. }
  44.  
  45. /**
  46. * @param selectedForm the selectedForm to set
  47. */
  48. public void setSelectedForm(Forms selectedForm) {
  49. this.selectedForm = selectedForm;
  50. }
  51.  
  52. /**
  53. * @return the selectedForm
  54. */
  55. public Forms getSelectedForm() {
  56. return selectedForm;
  57. }
  58.  
  59. /**
  60. * @param formId the formId to set
  61. */
  62. public void setFormId(Long formId) {
  63. this.formId = formId;
  64. }
  65.  
  66. /**
  67. * @return the formId
  68. */
  69. public Long getFormId() {
  70. return formId;
  71. }
  72.  
  73.  
  74. }
Advertisement
Add Comment
Please, Sign In to add comment