01: /*
02: * Copyright 2005-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
05: * in compliance with the License. You may obtain a copy of the License at
06: *
07: * http://www.apache.org/licenses/LICENSE-2.0
08: *
09: * Unless required by applicable law or agreed to in writing, software distributed under the License
10: * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11: * or implied. See the License for the specific language governing permissions and limitations under
12: * the License.
13: */
14:
15: package org.strecks.web.form.impl;
16:
17: import org.strecks.bind.annotation.BindSelect;
18: import org.strecks.bind.annotation.BindSimple;
19: import org.strecks.converter.FullDateConverter;
20: import org.strecks.converter.SafeBeanUtilsConverter;
21: import org.strecks.validator.annotation.ValidateDate;
22: import org.strecks.validator.annotation.ValidateRequired;
23:
24: /**
25: * @author Phil Zoio
26: */
27: public class ActionProjectForm extends EditProjectForm {
28:
29: private static final long serialVersionUID = 6840278372111325346L;
30:
31: /* ****** form properties ******* */
32:
33: private String readyDate;
34:
35: private String projectName;
36:
37: private String projectDescription;
38:
39: private String selectedProjectType;
40:
41: /* ****** form getter and setters ******* */
42:
43: @BindSimple(expression="project.projectName")
44: public String getProjectName() {
45: return projectName;
46: }
47:
48: @ValidateRequired(order=1,key="project.name.required")
49: public void setProjectName(String projectName) {
50: this .projectName = projectName;
51: }
52:
53: @BindSimple(expression="project.projectDescription",converter=SafeBeanUtilsConverter.class)
54: public String getProjectDescription() {
55: return projectDescription;
56: }
57:
58: public void setProjectDescription(String projectDescription) {
59: this .projectDescription = projectDescription;
60: }
61:
62: @BindSimple(expression="project.readyDate",converter=FullDateConverter.class)
63: public String getReadyDate() {
64: return readyDate;
65: }
66:
67: @ValidateDate(order=101,key="invalid.full.date.format")
68: public void setReadyDate(String readyDate) {
69: this .readyDate = readyDate;
70: }
71:
72: @BindSelect(targetBeanExpression="project.projectType",targetBeanIdProperty="projectTypeId",lookupMapExpression="availableProjectTypes",idClass=Integer.class)
73: public String getSelectedProjectType() {
74: return selectedProjectType;
75: }
76:
77: @ValidateRequired(order=31,key="project.type.required")
78: public void setSelectedProjectType(String selectedProjectType) {
79: this.selectedProjectType = selectedProjectType;
80: }
81: }
|