001: /*
002: * $Id: RegistrationForm.java 471754 2006-11-06 14:55:09Z husted $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021:
022: package org.apache.struts.webapp.validator;
023:
024: import java.io.Serializable;
025: import javax.servlet.http.HttpServletRequest;
026: import org.apache.struts.action.ActionMapping;
027: import org.apache.struts.validator.ValidatorForm;
028:
029: /**
030: * Form bean for the user registration page.
031: *
032: */
033: public final class RegistrationForm extends ValidatorForm implements
034: Serializable {
035: private String action = null;
036:
037: private String sFirstName = null;
038: private String sLastName = null;
039: private String sAddr = null;
040: private CityStateZip csz = new CityStateZip();
041: private String sPhone = null;
042: private String sEmail = null;
043:
044: public String getAction() {
045: return action;
046: }
047:
048: public void setAction(String action) {
049: this .action = action;
050: }
051:
052: public String getFirstName() {
053: return sFirstName;
054: }
055:
056: public void setFirstName(String sFirstName) {
057: this .sFirstName = sFirstName;
058: }
059:
060: public String getLastName() {
061: return sLastName;
062: }
063:
064: public void setLastName(String sLastName) {
065: this .sLastName = sLastName;
066: }
067:
068: public String getAddr() {
069: return sAddr;
070: }
071:
072: public void setAddr(String sAddr) {
073: this .sAddr = sAddr;
074: }
075:
076: public CityStateZip getCityStateZip() {
077: return csz;
078: }
079:
080: public void setCityStateZip(CityStateZip csz) {
081: this .csz = csz;
082: }
083:
084: public String getPhone() {
085: return sPhone;
086: }
087:
088: public void setPhone(String sPhone) {
089: this .sPhone = sPhone;
090: }
091:
092: public String getEmail() {
093: return sEmail;
094: }
095:
096: public void setEmail(String sEmail) {
097: this .sEmail = sEmail;
098: }
099:
100: /**
101: * Reset all properties to their default values.
102: *
103: * @param mapping The mapping used to select this instance
104: * @param request The servlet request we are processing
105: */
106: public void reset(ActionMapping mapping, HttpServletRequest request) {
107: action = null;
108: sFirstName = null;
109: sLastName = null;
110: sAddr = null;
111: csz = new CityStateZip();
112: sPhone = null;
113: sEmail = null;
114: }
115:
116: }
|