<a4j:commandButton> Back end bean method is not invoked on click event.
833902Feb 8 2011 — edited Feb 11 2011I am using below code. It seems back end bean method is not called when I click commandbutton. I think it has some thing to with rendering.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<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:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:cdm="http://mportal.com/cdm">
<ui:composition>
<rich:panel>
<a4j:form id="RefreshPropertiesInstanceForm">
<table id="RefreshPropertiesTable" width="100%" border="0">
<tr>
<td width="35%" align="right">
<div class="fieldLabel">Property File Name :<span
class="requiredField">*</span></div>
</td>
<td style="margin-top: 15px; padding-left: 15px" nowrap="nowrap"
align="left"><rich:comboBox id="combo"
value="#{testPropertyRefreshHelper.selectedPropertyFile}"
enableManualInput="false">
<f:selectItems value="#{testPropertyRefreshDetails.propertyFileNameList}" />
<a4j:support event="onchange"
reRender="RefreshPropertiesInstanceForm" BypassUpdates="false"
ajaxSingle="true" action="#{testPropertyRefreshHelper.getPropertyFileContentFromRemoteServer}" />
</rich:comboBox></td>
</tr>
<tr>
<td style="margin-top: 10px; padding-left: 100px" align="left"
colspan="3"><h:inputTextarea id="firstTextArea" value="#{testPropertyRefreshHelper.propertyFileContent}"
rows="21" cols="150"
style="overflow-x: auto; overflow-y: scroll"
rendered="#{testPropertyRefreshHelper.selectedPropertyFile != 'Choose from below'}"
disabled="#{testPropertyRefreshHelper.selectedPropertyFile == 'Choose from below'}">
</h:inputTextarea></td>
</tr>
<tr>
<td style="margin-top: 10px; padding-left: 400px" align="left"
colspan="2">
<a4j:commandButton id='refreshPropertyButton' value="refresh"
image="#{imageManager.imageMap['REFRESH_BUTTON']}"
rendered="#{testPropertyRefreshHelper.selectedPropertyFile != 'Choose from below'}"
action="#{testPropertyRefreshHelper.updatePropertyFileContentInRemoteServer}"
reRender="RefreshPropertiesInstanceForm" >
</a4j:commandButton>
</td>
</tr>
</table>
</a4j:form>
</rich:panel>
</ui:composition>
</html>
Every thing works perfectly. But when I click command button "#{testPropertyRefreshHelper.updatePropertyFileContentInRemoteServer}" backing bean method is not invoked. Other componenets are working properly.