#18399: Better error message when a shape is not available

Work Item: 18399

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-02-01 14:46:25 -08:00
parent e59badbc54
commit 9dc53c6c1b

View File

@@ -66,12 +66,12 @@ namespace Orchard.DisplayManagement.Implementation {
ShapeBinding shapeBinding;
if (TryGetDescriptorBinding(shapeMetadata.Type, Enumerable.Empty<string>(), shapeTable, out shapeBinding)) {
shapeBinding.ShapeDescriptor.Displaying.Invoke(action => action(displayingContext), Logger);
}
// copy all binding sources (all templates for this shape) in order to use them as Localization scopes
shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources.Where(x => x != null).ToList();
if (!shapeMetadata.BindingSources.Any()) {
shapeMetadata.BindingSources.Add(shapeBinding.ShapeDescriptor.BindingSource);
// copy all binding sources (all templates for this shape) in order to use them as Localization scopes
shapeMetadata.BindingSources = shapeBinding.ShapeDescriptor.BindingSources.Where(x => x != null).ToList();
if (!shapeMetadata.BindingSources.Any()) {
shapeMetadata.BindingSources.Add(shapeBinding.ShapeDescriptor.BindingSource);
}
}
// invoking ShapeMetadata displaying events