ErrorList
THIS ARTICLE IS READY FOR REVIEW!!!
ErrorList widget can be used to display list of errors (client-side or server-side / technical or functional). These errors and messages can be triggered via error management subsystem in Aria Template, which produces nested list of messages that can be displayed by the widget by binding.
The simple way to add ErrorList widget to your application is as follows
File /widgets/errorlist/Snippet.tpl
margins: "10 1 10 1",
title: "Information",
filterTypes: ['I'],
messages:[{
type : "I",
localizedMessage : "Information message"
}]
Also ErrorList widget is highly configurable, for instance you can filter the type of error (E,F,W etc..), binding the message and tooltip properties and lot more. The whole list of configuration parameters is available in ErrorListCfg bean.
Filter Types
The following filter types are supported:
- TYPE_FATAL = "F" -- uses the error icon.
- TYPE_ERROR = "E" -- uses the error icon.
- TYPE_WARNING = "W" -- uses the warning icon.
- TYPE_INFO = "I" -- uses the info icon.
- TYPE_NOTYPE = "N" -- uses the info icon.
- TYPE_CRITICAL_WARNING = "C" -- uses the warning icon.
- TYPE_CONFIRMATION = "O" -- uses the confirmation icon.
File /widgets/errorlist/Snippet.tpl
margins: "10 1 10 1",
title: "Information",
filterTypes: ['I'],
messages : [{
type : "O",
localizedMessage : localisedMsg.filterOut }, {
type : "I",
localizedMessage : localisedMsg.filterIn }, {
type : "E",
localizedMessage : localisedMsg.filterOut }]
Binding
ErrorList widget is also a bind-able widget and the properties bindable are
- message
- tooltip
For more information please read the article on Widget Bindings.
File /widgets/errorlist/Snippet.tpl
margins: "10 1 10 1",
title: "Error",
filterTypes: ['E'],
bind: {
messages: {
to: "errorMessages",
inside: data
}
}
Customizing the display
The ErrorList widget is a based on a template to display its content. Therefore, it may be customized to fit several types of displays.
File /widgets/errorlist/Snippet.tpl
margins: "10 1 10 1",
title: "Information",
defaultTemplate: "ariadoc.samples.widgets.errorlist.CustomizedErrorListTemplate",
bind: {
messages: {
to: "errorMessages",
inside: data
}
}
