View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.myfaces.application.pss;
20  
21  import javax.faces.component.UIViewRoot;
22  import javax.faces.event.FacesEvent;
23  import javax.faces.context.FacesContext;
24  import java.util.*;
25  
26  /**
27   * @author Martin Haimberger
28   */
29  public class UIViewRootWrapper extends UIViewRoot
30  {
31  
32      private UIViewRoot _originalViewRoot;
33  
34      public UIViewRootWrapper( UIViewRoot orUiViewRoot) {
35          _originalViewRoot = orUiViewRoot;
36      }
37  
38      public boolean getRendersChildren() {
39          return true;
40      }
41  
42  
43  
44      public String getViewId()
45      {
46          return _originalViewRoot.getViewId();
47      }
48  
49      public void setViewId(String viewId)
50      {
51          _originalViewRoot.setViewId(viewId);
52      }
53  
54      public void queueEvent(FacesEvent event)
55      {
56          _originalViewRoot.queueEvent(event);
57      }
58  
59      public void processDecodes(FacesContext context)
60      {
61        _originalViewRoot.processDecodes(context);
62      }
63  
64      public void processValidators(FacesContext context)
65      {
66         _originalViewRoot.processValidators(context);
67      }
68  
69      public void processUpdates(FacesContext context)
70      {
71          _originalViewRoot.processUpdates(context);
72      }
73  
74      public void processApplication(FacesContext context)
75      {
76          _originalViewRoot.processApplication(context);
77      }
78  
79      public void encodeBegin(FacesContext context)
80              throws java.io.IOException
81      {
82         _originalViewRoot.encodeBegin(context);
83      }
84  
85      /* Provides a unique id for this component instance.
86      */
87      public String createUniqueId()
88      {
89         return _originalViewRoot.createUniqueId();
90      }
91  
92      public Locale getLocale()
93      {
94         return _originalViewRoot.getLocale();
95      }
96  
97  
98      public void setLocale(Locale locale)
99      {
100         _originalViewRoot.setLocale(locale);
101     }
102 
103     //------------------ GENERATED CODE BEGIN (do not modify!) --------------------
104 
105     public static final String COMPONENT_TYPE = "javax.faces.ViewRoot";
106     public static final String COMPONENT_FAMILY = "javax.faces.ViewRoot";
107 
108     public String getFamily()
109     {
110         return COMPONENT_FAMILY;
111     }
112 
113 
114     public void setRenderKitId(String renderKitId)
115     {
116         _originalViewRoot.setRenderKitId(renderKitId);
117     }
118 
119     public String getRenderKitId()
120     {
121         return _originalViewRoot.getRenderKitId();
122     }
123 
124 
125 
126     public Object saveState(FacesContext context)
127     {
128        return _originalViewRoot.saveState(context);
129     }
130 
131     public void restoreState(FacesContext context, Object state)
132     {
133         _originalViewRoot.restoreState(context,state);
134     }
135     //------------------ GENERATED CODE END ---------------------------------------
136 
137 
138 }