]
Juraj Huska reassigned RF-12003:
--------------------------------
Assignee: (was: Juraj Huska)
Including h:head breaks f:ajax events of commandButton
------------------------------------------------------
Key: RF-12003
URL:
https://issues.jboss.org/browse/RF-12003
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: base functionality
Affects Versions: 4.1.0.Final, 4.2.0.CR1
Environment: JBoss 7.0.2 Final, JBoss 7.1.0 Final, RichFaces 4.2.0 Final, 4.1.0
Final, Chrome and Safari
Reporter: Joern Ohmen
Priority: Critical
Labels: Header, JSF2.0, RichFaces4
Attachments: brokenRFHheadAdded.png
If I add h:head-Tag to my page, the ajax events of the h:commandButton are not working.
The example should show up a panel with a click on a button, but nothing happens. The
example is working when h:head is removed. I use a ConversationScoped Bean.
{code}
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<h:html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:head>
<title>Test</title>
</h:head>
<f:metadata>
<f:event type="preRenderView"
listener="#{testController.beginConversation}" />
</f:metadata>
<h:body>
<f:view>
<h:form>
<h:commandButton value="showField"
action="#{testController.changeRenderInputPanel}">
<f:ajax event="click" render="inputPanelId"
execute="@form" />
</h:commandButton>
<h:panelGroup id="inputPanelId" layout="block"
rendered="#{testController.renderInputPanel}">
<h:outputText value="Author" />
<h:inputText value="#{testController.newCommentAuthor}" />
</h:panelGroup>
</h:form>
</f:view>
</h:body>
</h:html>
{code}
{code}
import java.io.Serializable;
import javax.enterprise.context.Conversation;
import javax.enterprise.context.ConversationScoped;
import javax.inject.Inject;
import javax.inject.Named;
import org.apache.commons.logging.Log;
@Named
@ConversationScoped
public class TestController implements Serializable{
private static final long serialVersionUID = 1L;
@Inject
private Conversation conversation;
private String newCommentAuthor;
private boolean renderInputPanel = true;
@Inject
private Log logger;
public boolean isRenderInputPanel() {
return renderInputPanel;
}
public void setRenderInputPanel(boolean renderInputPanel) {
this.renderInputPanel = renderInputPanel;
}
public void changeRenderInputPanel() {
this.setRenderInputPanel(!isRenderInputPanel());
logger.info("render panel: " + renderInputPanel);
}
public String getNewCommentAuthor() {
return newCommentAuthor;
}
public void setNewCommentAuthor(String newCommentAuthor) {
this.newCommentAuthor = newCommentAuthor;
}
public void beginConversation() {
if (conversation.isTransient()) {
conversation.setTimeout(120000);
conversation.begin();
}
}
public void endConversation() {
if (!conversation.isTransient()) {
conversation.end();
return;
}
}
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: