01: /*
02: * $Id: org.eclipse.jdt.ui.prefs 5004 2006-03-17 20:47:08 -0800 (Fri, 17 Mar
03: * 2006) eelco12 $ $Revision: 460470 $ $Date: 2006-03-17 20:47:08 -0800 (Fri, 17
04: * Mar 2006) $
05: *
06: * ==============================================================================
07: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
08: * use this file except in compliance with the License. You may obtain a copy of
09: * the License at
10: *
11: * http://www.apache.org/licenses/LICENSE-2.0
12: *
13: * Unless required by applicable law or agreed to in writing, software
14: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16: * License for the specific language governing permissions and limitations under
17: * the License.
18: */
19: package wicket.util.tester.apps_4;
20:
21: import wicket.markup.html.WebPage;
22: import wicket.markup.html.form.Form;
23: import wicket.markup.html.form.TextField;
24: import wicket.markup.html.form.validation.EmailAddressPatternValidator;
25: import wicket.model.CompoundPropertyModel;
26:
27: /**
28: * @author Juergen Donnerstag
29: */
30: public class EmailPage extends WebPage {
31: private static final long serialVersionUID = 1L;
32:
33: private String email;
34:
35: /**
36: * Construct
37: *
38: */
39: public EmailPage() {
40: Form form = new Form("form");
41: form.setModel(new CompoundPropertyModel(this ));
42: add(form);
43:
44: TextField email = new TextField("email");
45: email.add(EmailAddressPatternValidator.getInstance());
46: form.add(email);
47: }
48:
49: /**
50: *
51: * @return xx
52: */
53: public String getEmail() {
54: return this .email;
55: }
56:
57: /**
58: *
59: * @param email
60: */
61: public void setEmail(final String email) {
62: this.email = email;
63: }
64: }
|