001 /*
002 * Apache License
003 * Version 2.0, January 2004
004 * http://www.apache.org/licenses/
005 *
006 * Copyright 1996-2008 by Sven Homburg
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 * http://www.apache.org/licenses/LICENSE-2.0
013 */
014
015 package org.chenillekit.tapestry.core.factories;
016
017 import org.apache.tapestry5.Binding;
018 import org.apache.tapestry5.ComponentResources;
019 import org.apache.tapestry5.ioc.Location;
020 import org.apache.tapestry5.services.BindingFactory;
021
022 import org.chenillekit.tapestry.core.bindings.OgnlBinding;
023
024 /**
025 * Binding factory where the expression evaluated by OGNL.
026 *
027 * @version $Id: OgnlBindingFactory.java 594 2009-12-05 15:17:26Z mlusetti $
028 */
029 public class OgnlBindingFactory implements BindingFactory
030 {
031 public Binding newBinding(String description, ComponentResources container,
032 ComponentResources component,
033 String expression, Location location)
034 {
035 return new OgnlBinding(location, container.getComponent(), expression);
036 }
037 }