a4j:commandButton makes a full page reload RichFaces 3.3.3 CR1
cesaracorreia Mar 2, 2010 4:42 PMI have migrated one application from jsf1.2 to jsf2 and RichFaces 3.3.3 CR1. After some adjustments to the application became stable but my a4j:commandButtons doing a full page reload rather than rebuild only the piece of the tree indicated. Below i show my page:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<f:loadBundle basename="ApplicationResources" var="msgs" />
<ui:composition>
<rich:panel id="detailActorsPanel" styleClass="detailBox" columnClasses="detailBox" headerClass="detailBoxTitle" bodyClass="detailBox">
<f:facet name="header">
<h:panelGrid columns="2" width="100%"
style="height: 25; vertical-align: middle;" border="0"
cellpadding="0" cellspacing="0" id="projectDetailPanel"
columnClasses="buttonsInsertItem,titleDetailItem">
<a4j:commandButton value="#{msgs.buttonNewItem}"
rendered="#{not projectMasterDetail.dataReadOnly}"
onmouseover="hover(this,'menuButtonOver')"
onmouseout="hover(this,'menuButton')"
oncomplete="onErrorsJumpToTop();"
action="#{facesViewEventHandler.newItem}"
actionListener="#{facesViewEventHandler.newItem}"
reRender="detailActorsTable"
onclick="getField('registerForm:detailPropertyName').value='actors';"
styleClass="menuButton" id="detailProjectNew" />
<h:outputText value="#{msgs.titleDetailActors}"
styleClass="detailTitle" />
</h:panelGrid>
</f:facet>
<rich:dataTable var="item" value="#{project.actors}"
styleClass="detail" columnClasses="detail" headerClass="detail"
id="detailActorsTable" binding="#{arangiDataTableDetail1.table}">
<h:column>
<f:facet name="header">
<h:graphicImage value="/img/trash.gif" />
</f:facet>
<h:selectBooleanCheckbox value="#{item.checkDelete}"
rendered="#{not empty item.id}"
disabled="#{projectMasterDetail.dataReadOnly}"
title="#{msgs.markToDelete}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msgs.actorNumber} *" />
</f:facet>
<h:inputText value="#{item.number}" id="actorNumber"
readonly="#{projectMasterDetail.dataReadOnly}" maxlength="255"
size="4" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msgs.actorName} *" />
</f:facet>
<h:inputText value="#{item.name}" id="actorName"
readonly="#{projectMasterDetail.dataReadOnly}" maxlength="100"
size="40" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="#{msgs.actorDescription}" />
</f:facet>
<h:inputTextarea value="#{item.description}" id="actorDescription"
readonly="#{projectMasterDetail.dataReadOnly}" rows="3" cols="62"
title="#{msgs.actorDescriptionHelp}" >
<f:validateLength maximum="255" />
</h:inputTextarea>
</h:column>
</rich:dataTable>
</rich:panel>
</ui:composition>
</html>