Skip to content

Latest commit

 

History

History
61 lines (58 loc) · 4.95 KB

File metadata and controls

61 lines (58 loc) · 4.95 KB

Generic Module's Functions / Methods

Function Name Description Samples
AjaxRedirect
Box
Button
ButtonsContainerCssClass
ButtonsLocation
ControllerInterfaces
The interfaces that this user control (module) should implement.

WHEN TO USE/SET IT?
This is particularly useful when using ICallbackEventHandler interface for AJAX call backs.
CreatePhysicalModule
If this field is set to False, a separate module will not be created.

WHEN TO USE/SET IT?
When the contents of the module are very simple
CustomAttributes
DismissWarning
Dismisses all M# warnings on this object.
FindEntityType
Footer
In this field you can specify the footer for the module.

WHEN TO USE/SET IT?
When you want a markup to be generated at the bottom of this module.
GetCurrent
GetType
Gets the System.Type of the current instance.
Header
The markup to add at the beginning of this module's content.

WHEN TO USE/SET IT?
When you want a markup to be generated at the top of this module.
HeaderText
In this field you can specify heading for the module. All contents are placed inside h2 tag.

WHEN TO USE/SET IT?
When you wan to specify just the heading contents
Image
Inject
Injects an instance of a specified service type.
Inject
Injects an instance of a specified service type.
IsInUse
In this field you can specify if the module is used and should be build or not.

WHEN TO USE/SET IT?
If your module is used in a page directly, it will be built in build actions automatically.
If your module is not used in a page directly, but you still want it to be built, you should check this property.
IsViewComponent
Justification
In this field you can specify the purpose of creating a generic module. Be descriptive in specifying this attribute.
KeepOriginalFormatting
When set to True, the generated code will not be formatted and will be generated left aligned.

WHEN TO USE/SET IT?
It is recommended to not to set it True, because it keeping the original formatting will make it difficult to read an understand
Link
LoadJavascriptModule
Loads a Javascript (or Typescript) module upon page startup.

Parameters
relativePath: The relative path of the module inside wwwroot (without extension). E.g. /scripts/CustomModule1
LoadJavascriptService
Loads a Javascript (or Typescript) service module upon page startup.

Parameters
serviceKey: The key used to add the service either singleton or transient. E.g. CustomService
function: The method name to call on the loaded module.
arguments: An argument expression to pass to the method.
Markup
In this field you should enter the HTML body of the content. All HTML and ASP.NET tags are acceptable.

WHEN TO USE/SET IT?
This field should be entered in order to show something in the content
MarkupWrapper
In this field you can specify a wrapper template for the module.

WHEN TO USE/SET IT?
When want to customize the appearance of the module by adding extra markup around it.
MemberwiseClone
Creates a shallow copy of the current System.Object.
ModuleContentsWrapper
Multi_Lingual
If set to True, Phrases on static phrases i.e. Label Text, Heading, columns, button texts will be translated by selected language

WHEN TO USE/SET IT?
When you need to enable multi-lingual support on a single module. Please not that if the Multi-Lingual option in project settings is set then you do not need to set it explicitly.
Name
In this field you should enter the name of the module you want to create. This name should be a unique name for the module you have created.

WHEN TO USE/SET IT?
This is a mandatory field for the module.
NamespaceImports
In this field you can choose namespace(s) you need to import in the page backend.

WHEN TO USE/SET IT?
When you need to work with a class frequently and the namespace is not imported by default
Prefix
Reference
RootCssClass
In this field you can enter the css class of the module.

Tips
- css classes should always be lower case.
- Use "-" to separate the words in the css class.
- Use " " to separate multiple css classes.

WHEN TO USE/SET IT?
When you need to apply some css to the module.
SecurityChecks
SoftError
UseAntiForgeryToken
Using
ViewModelInterfaces
ViewModelProperty
Creates a new property to be generated for this module's code.
VisibleIf
WrapInForm

Generic Module's Events / CallBacks

Event Name Description Samples
OnBound
OnBound_GET
OnControllerClassCode
OnJavascript
OnPostBound
OnPreBinding
OnPreBound
OnViewModelClassCode
OnViewModelConstructor