01: // Copyright 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // 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
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package org.apache.tapestry.integration.app2.pages;
16:
17: import org.apache.tapestry.annotations.Component;
18: import org.apache.tapestry.annotations.Persist;
19: import org.apache.tapestry.corelib.components.Form;
20: import org.apache.tapestry.corelib.components.Submit;
21: import org.apache.tapestry.corelib.components.TextField;
22:
23: public class TestPageForSubmit {
24: @SuppressWarnings("unused")
25: @Component
26: private Form form1;
27:
28: @SuppressWarnings("unused")
29: @Component
30: private Form form2;
31:
32: @SuppressWarnings("unused")
33: @Component
34: private Submit capitalize1;
35:
36: @SuppressWarnings("unused")
37: @Component
38: private Submit capitalize2;
39:
40: @SuppressWarnings("unused")
41: @Component(parameters="value=value")
42: private TextField t1;
43:
44: @SuppressWarnings("unused")
45: @Component(parameters="value=value")
46: private TextField t2;
47:
48: @Persist
49: private String value;
50:
51: public String getValue() {
52: return value;
53: }
54:
55: public void setValue(String value) {
56: this .value = value;
57: }
58:
59: void onSelectedFromCapitalize1() {
60: value = value.toUpperCase();
61: }
62:
63: void onSelectedFromCapitalize2() {
64: onSelectedFromCapitalize1();
65: }
66:
67: }
|