[richfaces-issues] [JBoss JIRA] Resolved: (RF-4473) a4j:commandButton doesn´t show messages in <h:messages> when it's an exception in the actionListener.

Denis Morozov (JIRA) jira-events at lists.jboss.org
Fri Dec 5 07:17:38 EST 2008


     [ https://jira.jboss.org/jira/browse/RF-4473?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Denis Morozov resolved RF-4473.
-------------------------------

    Resolution: Done
      Assignee: Tsikhon Kuprevich  (was: Denis Morozov)


> 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
>          Components: planning_all
>    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
>            Assignee: Tsikhon Kuprevich
>             Fix For: 3.3.0
>
>   Original Estimate: 2 days
>  Remaining Estimate: 2 days
>
> 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