01: package com.technoetic.xplanner.forms;
02:
03: import org.apache.struts.action.ActionErrors;
04: import org.apache.struts.action.ActionMapping;
05: import javax.servlet.http.HttpServletRequest;
06:
07: public class FeatureEditorForm extends AbstractEditorForm {
08: private String name;
09: private String description;
10: private int storyId;
11:
12: public String getContainerId() {
13: return Integer.toString(getStoryId());
14: }
15:
16: public ActionErrors validate(ActionMapping mapping,
17: HttpServletRequest request) {
18: ActionErrors errors = new ActionErrors();
19: if (isSubmitted()) {
20: require(errors, name, "feature.editor.missing_name");
21: }
22: return errors;
23: }
24:
25: public void reset(ActionMapping mapping, HttpServletRequest request) {
26: super .reset(mapping, request);
27: name = null;
28: description = null;
29: storyId = 0;
30: }
31:
32: public String getName() {
33: return name;
34: }
35:
36: public void setName(String name) {
37: this .name = name;
38: }
39:
40: public void setDescription(String description) {
41: this .description = description;
42: }
43:
44: public String getDescription() {
45: return description;
46: }
47:
48: public void setStoryId(int storyId) {
49: this .storyId = storyId;
50: }
51:
52: public int getStoryId() {
53: return storyId;
54: }
55: }
|