int dotx = parameterName.lastIndexOf('.');
if (dotx > 0)
{
String mixinName = parameterName.substring(0, dotx);
InternalComponentResources mixinResources = InternalUtils.get(mixinIdToComponentResources, mixinName);
if (mixinResources == null) throw new TapestryException(
StructureMessages.missingMixinForParameter(completeId, mixinName, parameterName), binding, null);
String simpleName = parameterName.substring(dotx + 1);
mixinResources.bindParameter(simpleName, binding);
return;
}
InternalComponentResources informalParameterResources = null;
// Does it match a formal parameter name of the core component? That takes precedence
if (coreResources.getComponentModel().getParameterModel(parameterName) != null)
{
coreResources.bindParameter(parameterName, binding);
return;
}
for (String mixinName : InternalUtils.sortedKeys(mixinIdToComponentResources))
{
InternalComponentResources resources = mixinIdToComponentResources.get(mixinName);
if (resources.getComponentModel().getParameterModel(parameterName) != null)
{
resources.bindParameter(parameterName, binding);
return;
}
if (informalParameterResources == null && resources.getComponentModel().getSupportsInformalParameters())
informalParameterResources = resources;
}
// An informal parameter