
|
If you were logged in you would be able to see more operations.
|
|
|
|
At least in my Test-Web, ApplicationContext property on IApplicationContextAware controls doesn't get set if they are run through ConfigureObject()
|
|
Description
|
At least in my Test-Web, ApplicationContext property on IApplicationContextAware controls doesn't get set if they are run through ConfigureObject() |
Show » |
Sort Order:
|
ConfigureObject was calling ApplyObjectPropertyValues that does this :
RootObjectDefinition definition = GetMergedObjectDefinition(name, true);
if (definition != null)
{
log.Debug(string.Format("configuring object '{0}' using definition '{1}'", instance, name));
ApplyPropertyValues(name, definition, new ObjectWrapper(instance), definition.PropertyValues);
}
I've changed ConfigureObject to call PopulateObject instead, PopulateObject will call ApplyPropertyValues after autowiring and dependy checks :
RootObjectDefinition definition = GetMergedObjectDefinition(name, true);
if (definition != null)
{
log.Debug(string.Format("configuring object '{0}' using definition '{1}'", target, name));
PopulateObject(name, definition, new ObjectWrapper(target));
}
I didn't looked for applying IApplicationContextAware, IObjectNameAware, etc...
Bruno