In cart page there is a custom component to display the wishlist items. Can I use global error message to display the messages in the custom component. I have tried displaying the same in custom component.But the error message is not getting displayed. Is it possible to use the global message in custom component.?
Yes, you can use global messages in custom CMS components.
Include globalMessages tag in the customcomponent.jsp
<%@ taglib prefix="common" tagdir="/WEB-INF/tags/responsive/common"%>
<common:globalMessages />
Add the error message in the fillmodel() method of your CustomComponentController.java
GlobalMessages.addErrorMessage(model, "your.error.msg.key");