[richfaces-issues] [JBoss JIRA] Created: (RF-4473) a4j:commandButton doesn´t show messages in <h:messages> when it's an exception in the actionListener.
Aimar Tellitu (JIRA)
jira-events at lists.jboss.org
Mon Sep 15 04:37:20 EDT 2008
a4j:commandButton doesn´t show messages in <h:messages> when it's an exception in the actionListener.
-----------------------------------------------------------------------------------------------------
Key: RF-4473
URL: https://jira.jboss.org/jira/browse/RF-4473
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.2
Environment: JDK 1.6.0_05, JBoss AS 4.2.1, Mojarra 1.2_09-b02-FCS, RichFaces 3.2.2 and 3.2.1
Reporter: Aimar Tellitu
a4j:commandButton doesn´t show messages in <h:messages> when it's an exception in the actionListener. But with <h:commandButton> the messages are shown.
Here is a simple example:
<h:form>
<h:commandButton value="Test with h" actionListener="#{test.throwAbortProcessingException}" />
<a4j:commandButton value="Test with a4j" actionListener="#{test.throwAbortProcessingException}" />
<a4j:outputPanel ajaxRendered="true">
<h:messages/>
</a4j:outputPanel>
</h:form>
And the code of the Managed Bean:
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
public class Test {
public void throwAbortProcessingException( ActionEvent event ) {
addMessage( event, "Message before AbortProcessingException");
throw new AbortProcessingException();
}
public void addMessage( ActionEvent event, String message ) {
FacesContext context = FacesContext.getCurrentInstance();
String clientId = event.getComponent().getClientId(context);
context.addMessage( clientId, new FacesMessage("message") );
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the richfaces-issues
mailing list