In EGL/JSF there is an api called Syslib.setError("errorMsg"). This api display the error message in the UI provided there is an error component available in the page. You can put that error component by dragging onto the page from enhanced faces component . So far so good.
Now if you want to display multiple message with a break in each line. For example you want to display following messages:
Warning: you have not entered street name.
Form has been saved.
Now if you want to display these lines in the same fashion as above you can not do that using setError function. It will display both the statement in the same line. Also if you want to set different colors for warning and success message you can not do.
Now how to accomplish this requirement. JSF provide one component called outputText. You can drag this component from Enhanced Faces component list. Then create a string variable in the JSF Handler and assign the variable as below:
multipleMsg String = "Warning: you have not entered street name
Form has been saved";
Form has been saved";
After that bind this multipleMsg variable to the outputText component in the jsp. Similarly you can also add color on to these texts.
Is not it cool
Regards
Monu





