Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Subview2 |
|
| 1.0;1 |
1 | /* | |
2 | * Licensed to the Apache Software Foundation (ASF) under one or more | |
3 | * contributor license agreements. See the NOTICE file distributed with | |
4 | * this work for additional information regarding copyright ownership. | |
5 | * The ASF licenses this file to you under the Apache License, Version 2.0 | |
6 | * (the "License"); you may not use this file except in compliance with | |
7 | * the License. You may obtain a copy of the License at | |
8 | * | |
9 | * http://www.apache.org/licenses/LICENSE-2.0 | |
10 | * | |
11 | * Unless required by applicable law or agreed to in writing, software | |
12 | * distributed under the License is distributed on an "AS IS" BASIS, | |
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
14 | * See the License for the specific language governing permissions and | |
15 | * limitations under the License. | |
16 | * | |
17 | * $Id: Subview2.java 465405 2006-10-18 22:41:29Z craigmcc $ | |
18 | */ | |
19 | ||
20 | package org.apache.shale.examples.test.view; | |
21 | ||
22 | import org.apache.shale.view.AbstractViewController; | |
23 | ||
24 | /** | |
25 | * <p>Second page for subview lifecycle event tests.</p> | |
26 | */ | |
27 | 0 | public class Subview2 extends AbstractViewController { |
28 | ||
29 | ||
30 | // -------------------------------------------------------------- Properties | |
31 | ||
32 | ||
33 | // The "Recorder" object for this request | |
34 | 0 | private Recorder recorder = null; |
35 | public Recorder getRecorder() { | |
36 | 0 | return this.recorder; |
37 | } | |
38 | public void setRecorder(Recorder recorder) { | |
39 | 0 | this.recorder = recorder; |
40 | 0 | } |
41 | ||
42 | ||
43 | // ------------------------------------------------------- Lifecycle Methods | |
44 | ||
45 | ||
46 | /** | |
47 | * <p>Record an init event.</p> | |
48 | */ | |
49 | public void init() { | |
50 | 0 | getRecorder().record("init2"); |
51 | 0 | System.out.println("Subview2.init()"); |
52 | 0 | } |
53 | ||
54 | ||
55 | /** | |
56 | * <p>Record a preprocess event.</p> | |
57 | */ | |
58 | public void preprocess() { | |
59 | 0 | getRecorder().record("preprocess2"); |
60 | 0 | System.out.println("Subview2.preprocess()"); |
61 | 0 | } |
62 | ||
63 | ||
64 | /** | |
65 | * <p>Record a prerender event.</p> | |
66 | */ | |
67 | public void prerender() { | |
68 | 0 | getRecorder().record("prerender2"); |
69 | 0 | System.out.println("Subview2.prerender()"); |
70 | 0 | } |
71 | ||
72 | ||
73 | /** | |
74 | * <p>Record a destroy event.</p> | |
75 | */ | |
76 | public void destroy() { | |
77 | 0 | getRecorder().record("destroy2"); |
78 | 0 | System.out.println("Subview2.destroy()"); |
79 | 0 | } |
80 | ||
81 | ||
82 | } |