KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > junit > mock > c31 > Home


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// 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.junit.mock.c31;
16
17 import org.apache.tapestry.IRequestCycle;
18 import org.apache.tapestry.html.BasePage;
19
20 /**
21  * Tests for the Hidden component.
22  *
23  * @author Tsvetelin Saykov
24  * @since 3.0
25  */

26
27 public abstract class Home extends BasePage
28 {
29     public abstract String JavaDoc getValue();
30
31     public abstract void setValue(String JavaDoc value);
32
33     public abstract String JavaDoc getHiddenID();
34
35     public abstract void setHiddenID(String JavaDoc hiddenID);
36
37     public abstract String JavaDoc getValueWithID();
38
39     public abstract void setValueWithID(String JavaDoc valueWithID);
40
41     public abstract String JavaDoc getValueWithEncoding();
42
43     public abstract void setValueWithEncoding(String JavaDoc valueWithID);
44
45     public abstract Boolean JavaDoc getBooleanValue();
46
47     public abstract void setBooleanValue(Boolean JavaDoc value);
48
49     protected void finishLoad()
50     {
51         setValue("1234567890");
52         setHiddenID("0987654321");
53         setValueWithID("1234567890-with id");
54         setValueWithEncoding("1234567890-with encoding");
55         setBooleanValue(Boolean.FALSE);
56     }
57
58     public void formSubmit(IRequestCycle cycle)
59     {
60         Two page = (Two) cycle.getPage("Two");
61
62         page.setValue(getValue());
63         page.setHiddenID(getHiddenID());
64         page.setValueWithEncoding(getValueWithEncoding());
65
66         cycle.activate(page);
67     }
68
69     public void hiddenListener(IRequestCycle cycle)
70     {
71         //just a test for listener
72
}
73
74     public boolean getEncode()
75     {
76         return false;
77     }
78 }
Popular Tags