Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package actions.survey;
- import data.*;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import com.opensymphony.xwork2.ActionContext;
- import actions.base.BaseAction;
- public class Listing extends BaseAction {
- /**
- *
- */
- private static final long serialVersionUID = -7954410790927568904L;
- private List<Forms> forms;
- private Forms selectedForm;
- private Long yourForm;
- public Listing() {
- }
- public String execute() {
- selectedForm = services.getFormsById(yourForm);
- return SUCCESS;
- }
- public String display() {
- forms = services.getForms();
- return NONE;
- }
- public String beginQuestions() {
- // Map<String, Object> context = new HashMap<String, Object>();
- // context.put("formId", getYourForm());
- // context.put("yourForm", yourForm);
- ActionContext.getContext().getValueStack().set("yourForm", getYourForm());
- return "redirect";
- }
- public List<Forms> getForms() {
- return forms;
- }
- /**
- * @param yourForm the yourForm to set
- */
- public void setYourForm(Long yourForm) {
- this.yourForm = yourForm;
- }
- /**
- * @return the yourForm
- */
- public Long getYourForm() {
- return yourForm;
- }
- /**
- * @param selectedForm the selectedForm to set
- */
- public void setSelectedForm(Forms selectedForm) {
- this.selectedForm = selectedForm;
- }
- /**
- * @return the selectedForm
- */
- public Forms getSelectedForm() {
- return selectedForm;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment