01: /*
02: * Copyright 2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 javax.faces.el.VariableResolver;
19: import javax.faces.el.EvaluationException;
20: import javax.faces.context.FacesContext;
21:
22: /**
23: * Represents the last Variable resolver in the chain - is added to be able to
24: * through an Evaluation Exception, even if any third-party Variable Resolver is
25: * added to the mix.
26: *
27: * @author Martin Marinschek (latest modification by $Author: dennisbyrne $)
28: * @version $Revision: 375880 $ $Date: 2006-02-08 08:27:18 +0100 (Mi, 08 Feb 2006) $
29: */
30: public class LastVariableResolverInChain extends VariableResolver {
31: private VariableResolver delegate;
32:
33: public LastVariableResolverInChain(VariableResolver variableResolver) {
34: delegate = variableResolver;
35: }
36:
37: // METHODS
38: public Object resolveVariable(FacesContext facesContext, String name)
39: throws EvaluationException {
40: return delegate.resolveVariable(facesContext, name);
41: }
42: }
|