formattedMessages to display message on page

Hi Guys,

I am using caf_h:formattedMessages tag to display message on multiple portlet pages. In all the portlet pages I have set it’s property ‘redisplay’ to ‘false’ as I don’t want to see the same message appear multiple times on the page.

Per the configuration, the caf_h:formattedMessages is not displaying message more than once in some pages (good), but strangely it is not exhibiting this behavior on the other pages.(that is, it is displaying message multiple times - bad). Am I missing any other configuration?

On the xhtml page -

<caf_h:formattedMessages id="messageID" redisplay="false"
			showDetail="false" globalOnly="false"></caf_h:formattedMessages>

in the backing bean -

					(String) getClientIds().getValue("messageID"),
					new FacesMessage("Custom message - to be displayed only once"));

webMethods version - 9.8

Hi Raja,

I had similar issue with this control. Here i was using this to display error messages.
Issue was with the multiple async refreshes happening on the screen, which resulted in duplicate messages. Started dropping the number of refreshes and the issue was resolved.

Do you have a list of messages to display ?
Just to be safe on the message list to display use HashSet to build the message list and then looped over to display the error messages.

Below is the code extract.

Iterator iterator = validationResults.iterator();
while ( iterator.hasNext() ) {
ValidationResult validationResult = (ValidationResult);
getFacesContext().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, validationResult.getMessage(), validationResult.getMessage()));
if (getFacesContext().getMessages().hasNext()) {

If you are able to provide a sample project that demonstrates a problem, you should open up a support ticket with your findings for further analysis.

Whichever R&D engineer handles this case will be expecting a clear description of the issue and any other details in order to efficiently be able to help. Providing this info in the beginning will make the process go faster.