KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > myfaces > config > TestViewHandlerA


1 /*
2  * Copyright 2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.myfaces.config;
17
18 import java.util.Locale JavaDoc;
19 import java.io.IOException JavaDoc;
20 import javax.faces.application.ViewHandler;
21 import javax.faces.context.FacesContext;
22 import javax.faces.component.UIViewRoot;
23 import javax.faces.FacesException;
24
25
26 /**
27  * @author <a HREF="mailto:oliver@rossmueller.com">Oliver Rossmueller</a>
28  */

29 public class TestViewHandlerA extends ViewHandler
30 {
31
32     private ViewHandler delegate;
33
34
35     public TestViewHandlerA(ViewHandler delegate)
36     {
37         this.delegate = delegate;
38     }
39
40
41     public ViewHandler getDelegate()
42     {
43         return delegate;
44     }
45
46
47     public Locale JavaDoc calculateLocale(FacesContext context)
48     {
49         return delegate.calculateLocale(context);
50     }
51
52
53     public String JavaDoc calculateRenderKitId(FacesContext context)
54     {
55         return delegate.calculateRenderKitId(context);
56     }
57
58
59     public UIViewRoot createView(FacesContext context, String JavaDoc viewId)
60     {
61         return delegate.createView(context, viewId);
62     }
63
64
65     public String JavaDoc getActionURL(FacesContext context, String JavaDoc viewId)
66     {
67         return delegate.getActionURL(context, viewId);
68     }
69
70
71     public String JavaDoc getResourceURL(FacesContext context, String JavaDoc path)
72     {
73         return delegate.getResourceURL(context, path);
74     }
75
76
77     public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException JavaDoc, FacesException
78     {
79         delegate.renderView(context, viewToRender);
80     }
81
82
83     public UIViewRoot restoreView(FacesContext context, String JavaDoc viewId)
84     {
85         return delegate.restoreView(context, viewId);
86     }
87
88
89     public void writeState(FacesContext context) throws IOException JavaDoc
90     {
91         delegate.writeState(context);
92     }
93
94 }
95
Popular Tags