Hi Jens,

I found out what the "mb:bean" notation is... its just a custom binding

In tapestry we can specify such notations "prop:myProperty"

In this case... the framework I am using TYNAMO implements a new binding called 
ModelBinding and it gets facilitated by a ModelBindingFactory.

package org.tynamo.bindings;

public class ModelBindingFactory extends PropBindingFactory implements 
BindingFactory
{

    public ModelBindingFactory(PropertyConduitSource propertyConduitSource, 
StringInterner interner)
    {
        super(propertyConduitSource, interner);
    }

    @Override
    public Binding newBinding(String description, ComponentResources container, 
ComponentResources component,
                              String expression, Location location)
    {
        return new ModelBinding(super.newBinding(description, container, 
component, expression, location));
    }
}

public class ModelBinding implements Binding
{
    private final Binding binding;

    public ModelBinding(Binding binding)
    {
        this.binding = binding;
    }

    public Class getBindingType()
    {
        Object object = binding.get();
        if (object == null) throw new NullPointerException("ModelBinding's 
value can't be null!");
        return object.getClass();
    }

    public Object get()
    {
        return binding.get();
    }

    public void set(Object value)
    {
        binding.set(value);
    }

    public boolean isInvariant()
    {
        return binding.isInvariant();
    }

    public <T extends Annotation> T getAnnotation(Class<T> tClass)
    {
        return binding.getAnnotation(tClass);
    }
}
                                          

Reply via email to