Support for third party modules, improved error handling, standardardized enum naming, reorganized interface definitions, support for DB script upgrades, added Settings entity
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
@using Oqtane.Models
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Modules
|
||||
|
||||
@DynamicComponent
|
||||
|
||||
@ -18,18 +19,26 @@
|
||||
{
|
||||
string typename = ModuleState.ModuleType;
|
||||
if (PageState.Control == "Settings") // module settings are a core component
|
||||
{
|
||||
{
|
||||
typename = Constants.DefaultSettingsControl;
|
||||
}
|
||||
Type moduleType = Type.GetType(typename);
|
||||
Type moduleType = null;
|
||||
if (typename != null)
|
||||
{
|
||||
moduleType = Type.GetType(typename);
|
||||
}
|
||||
if (moduleType != null)
|
||||
{
|
||||
builder.OpenComponent(ModuleState.ModuleId, moduleType); // set sequence to moduleid so that component tree is able to differentiate
|
||||
builder.OpenComponent(0, moduleType);
|
||||
builder.CloseComponent();
|
||||
}
|
||||
else
|
||||
{
|
||||
// module control does not exist with typename specified
|
||||
// module does not exist with typename specified
|
||||
builder.OpenComponent(0, Type.GetType(Constants.ModuleMessageControl));
|
||||
builder.AddAttribute(1, "Type", MessageType.Error);
|
||||
builder.AddAttribute(2, "Message", "Error Loading Component For Module " + ModuleState.ModuleDefinitionName);
|
||||
builder.CloseComponent();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user