I am using RichFaces 4. My problem is that the message does not appear at all. If I use rich:message the message appears briefly then dissapears.
This is the controller:
The problem was the a4j:ajax tag. It was sending a second request, and the messages were cleared. This works:
<h:form id="uploadForm" enctype="multipart/form-data">
<h:message id="message" showDetail="true" for="uploader" errorClass="error" warnClass="warning" infoClass="info" fatalClass="fatal"/>
<rich:fileUpload id="uploader"
fileUploadListener="#{itemController.uploadListener}"
maxFilesQuantity="1"
acceptedTypes="csv"
render="items, message" />
</h:form>
Rich upload doesn't rerender messages:
https://community.jboss.org/message/55888
https://issues.jboss.org/browse/RF-3566