001    /*
002     * TemplateBindingFactory.java
003     *
004     */ 
005    
006    package net.sf.tacos.binding;
007    
008    import org.apache.hivemind.Location;
009    import org.apache.tapestry.IBinding;
010    import org.apache.tapestry.IComponent;
011    import org.apache.tapestry.binding.AbstractBindingFactory;
012    import org.apache.tapestry.binding.BindingFactory;
013    
014    /**
015     *
016     * @author andyhot
017     */
018    public class TemplateBindingFactory extends AbstractBindingFactory
019    {
020        /**
021         * Internal used BindingFactory
022         */
023        private BindingFactory nestedBindingFactory;
024    
025        /**
026         * The BindingFactory for creating the inside variable IBinding.
027         *
028         * @param nestedBindingFactory Internal used BindingFactory
029         */
030        public void setNestedBindingFactory(BindingFactory nestedBindingFactory)
031        {
032            this.nestedBindingFactory = nestedBindingFactory;
033        }
034    
035        /**
036         * @see org.apache.tapestry.binding.BindingFactory#createBinding(org.apache.tapestry.IComponent, String, String, org.apache.hivemind.Location)
037         */
038        public IBinding createBinding(IComponent root, String bindingDescription, String path, Location location)
039        {
040            return new TemplateBinding(bindingDescription, location, getValueConverter(), root, path, nestedBindingFactory);
041        }
042    }