001    package net.sf.tacos.seam.binding;
002    
003    import org.apache.hivemind.Location;
004    import org.apache.tapestry.binding.AbstractBinding;
005    import org.apache.tapestry.coerce.ValueConverter;
006    import org.jboss.seam.core.Expressions;
007    
008    /**
009     * Implementation of {@link org.apache.tapestry.IBinding} responsible for EL expressions.
010     * 
011     * @author Igor Drobiazko
012     *
013     */
014    public class ELBinding extends AbstractBinding {
015    
016            protected ELBinding(String description, ValueConverter valueConverter,
017                            Location location) {
018                    super(description, valueConverter, location);
019            }
020    
021            public Object getObject() {
022                    Expressions e = Expressions.instance();
023                    return e.createValueExpression(wrap(getDescription())).getValue();
024            }
025            
026            private String wrap(String str){
027                    return "#{"+str+"}";
028            }
029            
030    
031    }