providers.add(new LiteralStringProvider(expression.substring(startx, expansionx)));
int endx = expression.indexOf("}", expansionx);
if (endx < 0)
throw new TapestryException(ServicesMessages
.unclosedAttributeExpression(expression), location, null);
String expansion = expression.substring(expansionx + 2, endx);
final Binding binding = _bindingSource.newBinding(
"attribute expansion",
resources,
resources,
PROP_BINDING_PREFIX,
expansion,
location);
final StringProvider provider = new StringProvider()
{
public String provideString()
{
try
{
Object raw = binding.get();
return _typeCoercer.coerce(raw, String.class);
}
catch (Exception ex)
{
throw new TapestryException(ex.getMessage(), location, ex);
}
}
};
providers.add(provider);