[richfaces-issues] [JBoss JIRA] Created: (RF-4440) reRender on a4j:commandButton only works once
Stefan Mohr (JIRA)
jira-events at lists.jboss.org
Tue Sep 9 17:03:38 EDT 2008
reRender on a4j:commandButton only works once
---------------------------------------------
Key: RF-4440
URL: https://jira.jboss.org/jira/browse/RF-4440
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: Netbeans 6.1; Sun Java Application Server 9.1 under Windows XP Professional 32-bit. Tested with Chrome and IE8.
Reporter: Stefan Mohr
Sample code to reproduce:
JSP:
--------
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://richfaces.org/rich"prefix="rich" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<html>
<body>
<f:view>
<a4j:form id="pnlMain">
<a4j:commandButton action="#{TestBean.goView2}" rendered="#{TestBean.drawView1}" value="Go" reRender="pnlMain" />
<a4j:commandButton action="#{TestBean.goView1}" rendered="#{TestBean.drawView2}" value="Back to table (Broken)" reRender="pnlMain" />
<h:commandButton action="#{TestBean.goView1}" rendered="#{TestBean.drawView2}" value="Back to table (Working)">
<a4j:support reRender="pnlMain" />
</h:commandButton>
</a4j:form>
</f:view>
</body>
</html>
-------
Backing Bean:
-------
package test;
public class TestBean
{
private int currentView = 1;
public TestBean()
{
}
public boolean getDrawView1()
{
return currentView == 1;
}
public boolean getDrawView2()
{
return currentView == 2;
}
public String goView1()
{
currentView = 1;
return null;
}
public String goView2()
{
currentView = 2;
return null;
}
}
-------
To test:
Deploy page and click first "Go" link - page rerenders.
Now click "Back to table (Broken)" - page won't rerender.
The "(Working)" link, which uses a4j:support on an h:commandButton, works as expected.
--
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