Display error message at Table's Component row level -
To achieve :
Validation Code : (Text Box)
for(var iCount=0; iCount<tw.local.testBO.listLength-1; iCount++){
if(tw.local.testBO[iCount].userName == null || tw.local.testBO[iCount].userName == "" ){
var componentName = "tw.local.testBO[" + iCount + "].userName";tw.system.addCoachValidationError(tw.system.coachValidation, componentName, "Please provide user details...");
}
}
Validation Code : (Combo Box)
For combo box, it could not be achieved with binding because binding is having list. It can be done through selected item.
Configuration -- Selected Item -- Assign a Name Value Pair variable. Suppose variable name is "userNameNV".
for(var iCount=0; iCount<tw.local.testBO.listLength-1; iCount++){
if(tw.local.testBO[iCount].userNameNV == null ||
tw.local.testBO[iCount].userNameNV == "" ){
var componentName = "tw.local.testBO[" + iCount + "].userNameNV";tw.local.testBO[iCount].userNameNV == "" ){
tw.system.addCoachValidationError(tw.system.coachValidation,
componentName, "Please provide user details...");
}
}
--------------------------
----------End------------
--------------------------
No comments:
Post a Comment