01: /*
02: * Copyright 2006 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:
17: package org.apache.myfaces.el;
18:
19: import javax.faces.context.FacesContext;
20: import javax.faces.el.EvaluationException;
21: import javax.faces.el.VariableResolver;
22:
23: /**
24: * This is the default VariableResolver. See JSF 1.2 spec section 5.8.1
25: *
26: * @author Stan Silvert
27: */
28: public class NullVariableResolver extends VariableResolver {
29:
30: /** Creates a new instance of NullVariableResolver */
31: public NullVariableResolver() {
32: }
33:
34: public Object resolveVariable(FacesContext facesContext, String name)
35: throws EvaluationException {
36:
37: facesContext.getELContext().setPropertyResolved(false);
38:
39: return null;
40: }
41:
42: }
|