Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* CDIELContext.java
 
 	Purpose:
 		
 	Description:
 		
 	History:
 		Wed Dec 28 11:25:12     2009, Created by henrichen
 
Copyright (C) 2009 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
	This program is distributed under LGPL Version 2.1 in the hope that
	it will be useful, but WITHOUT ANY WARRANTY.
}}IS_RIGHT
*/
package org.zkoss.zkplus.cdi;
An EL context that is based on XEL context for use with CDI.

Applicable to CDI version 1.0 or later

Author(s):
henrichen
/*package*/ class CDIELContext extends ELContext {
	private final XelContext _xelc;
	private final ELResolver _cdiResolver;
	private static final VariableMapper EMPTY_VAR_MAPPER =
		new VariableMapper() {
			public ValueExpression resolveVariable(String variable) {
				return null;
			}
			public ValueExpression setVariable(String variable,
			ValueExpression expression) {
			}
		};
	/*package*/ CDIELContext(final XelContext xelcELResolver cdiResolver) {
		 = xelc;
		 = cdiResolver;
	}
		return ;
	}
		return  != null ?
	}
		return //not support
	}
		return ;
	}
	private class XelELMapper extends javax.el.FunctionMapper {
		public XelELMapper(FunctionMapper mapper) {
			 = mapper;
		}
		public Method resolveFunction(String prefixString name) {
			if ( != null) {
				final Function f = .resolveFunction(prefixname);
				if (f != null)
					return f.toMethod();
			}
			return null;
		}
	}
New to GrepCode? Check out our FAQ X