Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
  * regarding copyright ownership.  The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
  *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.myfaces.commons.examples.accessedbeans;

Author(s):
Martin Marinschek (latest modification by $Author: matzew $)
Version:
$Revision: 167718 $ $Date: 2005-03-24 17:47:11 +0100 (Do, 24 M�r 2005) $
    private VariableResolver delegate;

    
Implementing delegate-pattern

Parameters:
delegate Delegating to this instance.
    {
        this. = delegate;
    }
    // METHODS
    public Object resolveVariable(FacesContext facesContextString namethrows EvaluationException
    {
        Object resolvedBean = .resolveVariable(facesContextname);
        if(!(resolvedBean instanceof AccessedBeans) && resolvedBean!=null)
        {
            if(!resolvedBean.getClass().getName().startsWith("java.lang.") && !(resolvedBean instanceof Map))
            {
                ((AccessedBeansfacesContext.getApplication().
                        getVariableResolver().resolveVariable(facesContext,"accessedBeans")).addBean(nameresolvedBean);
            }
        }
        return resolvedBean;
    }
New to GrepCode? Check out our FAQ X