reRender in a4j:support does not work for specific selectOne
shooali Apr 5, 2007 6:14 AMHi,
I have a weired problem. I have two places in my code that uses a4j:support to re render a selectOneMenu components. it works for the first (id ciAttributeOperator) but fails for the second (id filePropertyOperator). I cannot find the reason or the difference between the two. in the a4j log I see a warning message:
"No information in response about elements to replace".
I am attaching the page code and the log.
thanks,
<!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="https://ajax4jsf.dev.java.net/ajax" xmlns:c="http://java.sun.com/jstl/core" xmlns:rich="http://richfaces.ajax4jsf.org/rich"> <body> <ui:composition> <a4j:log level="ALL" popup="false" width="400" height="200"/> <c:set var="pageBean" value="#{policyEditingWizardStageAddCustomConstraintBean}"/> <script language="javascript" >resizeAllLayouts();</script> <span id="wizard_popup"> <div class="wizard_body_hd" id="wizard_body_hd" > <div class="title" >#{ajax_msgs['RULE_CONDITIONS_PAGE.BAR_TITLE']}</div> </div> <table id="wizard_popup_table" cellpadding="0" cellspacing="10" border="2" width="100%" style="padding-left: 20px;padding-right: 20px;"> <tr> <td>#{ajax_msgs['RULE_CONDITIONS_PAGE.TITLE']} <h:selectOneRadio id="constraintKindRadio" value="#{pageBean.selectedConstraintKind}" layout="pageDirection" converter="constraintKindConverter"> <f:selectItems id="constraintKindItems" value="#{pageBean.constraintKindItems}"/> <a4j:support event="onclick" reRender="allPanels"/> </h:selectOneRadio> </td> </tr> <tr> <td valign="middle"> <!-- ****************************************************** --> <!-- radio buttons above show and hide the following panels. --> <!-- ****************************************************** --> <h:panelGroup id="allPanels"> <!-- ********** config item attribute ************* --> <h:panelGroup id="ConfigItemAttributePanel" rendered="#{pageBean.configItemAttributeKind}"> <table align="left" width="100%" height="200" border="3" cellspacing="0"> <tr valign="top"> <td width="15%">#{ajax_msgs['RULE_CONDITIONS_PAGE.ATTR_FULL_NAME']}</td> <td> <h:inputText id="configItemAttributePath" value="#{pageBean.ciAttributeBean.path}" style="width: 250px"> <a4j:support event="onkeyup" reRender="ciAttributeOperator" ignoreDupResponses="true" requestDelay="200" limitToList="true"/> </h:inputText> <rich:suggestionbox id="attributePathSuggestBox" for="configItemAttributePath" var="attributePathSuggestion" suggestionAction="#{pageBean.ciAttributeBean.configItemAttributeSuggestions}" ignoreDupResponses="true" requestDelay="200" height="200" width="250"> <a4j:support event="onselect" reRender="ciAttributeOperator" ignoreDupResponses="true" requestDelay="200" limitToList="true"/> <h:column> <h:outputText value="#{attributePathSuggestion}"/> </h:column> </rich:suggestionbox> </td> </tr> <tr valign="top"> <td> <h:outputText id="ciAttributeOperatorLabel" value="#{ajax_msgs['RULE_CONDITIONS_PAGE.OPERATOR']}"> </h:outputText> </td> <td colspan="2"> <!-- ********** list box for choosing operator ********* --> <h:selectOneMenu id="ciAttributeOperator" value="#{pageBean.ciAttributeBean.operator}" converter="operatorConverter" style="width: 100px"> <f:selectItems id="ciAttributeOperatorItems" value="#{pageBean.ciAttributeBean.operatorOptions}"/> </h:selectOneMenu> </td> </tr> <tr valign="top"> <td>#{ajax_msgs['RULE_CONDITIONS_PAGE.VALUE']}</td> <td colspan="2"> <h:inputText id="ciAttributeValue" value="#{pageBean.ciAttributeBean.value}" styleClass="emc_text"/> </td> </tr> </table> </h:panelGroup> <!-- ***************** file property ************************ --> <h:panelGroup id="FilePropertyPanel" rendered="#{pageBean.filePropertyKind}"> <table align="left" width="100%" height="200" border="3" cellspacing="0"> <tr height="10%" valign="top"> <td width="15%">#{ajax_msgs['RULE_CONDITIONS_PAGE.CONFIGURATION_FILE']}</td> <td> <h:inputText id="filePropertyFilePath" value="#{pageBean.filePropertyBean.configurationFileName}"/> </td> </tr> <tr valign="top"> <td width="15%">#{ajax_msgs['RULE_CONDITIONS_PAGE.PROPERTY']}</td> <td><h:inputText id="filePropertyName" value="#{pageBean.filePropertyBean.name}"/></td> </tr> <tr valign="top"> <td>#{ajax_msgs['RULE_CONDITIONS_PAGE.HINT_ON_PROPERTY']}</td> <td> <h:selectOneMenu id="filePropertyTypeHintOption" value="#{pageBean.filePropertyBean.typeHint}" style="width:150;" styleClass="selectOneMenu" converter="typeHintConverter"> <a4j:support event="onchange" reRender="filePropertyOperator"/> <f:selectItems value="#{pageBean.filePropertyBean.typeHintOptions}" /> </h:selectOneMenu> </td> </tr> <tr valign="top"> <td>#{ajax_msgs['RULE_CONDITIONS_PAGE.OPERATOR']}</td> <td> <!-- ********** list box for choosing operator ********* --> <h:selectOneMenu id="filePropertyOperator" value="#{pageBean.filePropertyBean.operator}" converter="operatorConverter" style="width: 100px"> <f:selectItems id="filePropertyOperatorItems" value="#{pageBean.filePropertyBean.operatorOptions}"/> </h:selectOneMenu> </td> </tr> <tr valign="top"> <td>#{ajax_msgs['RULE_CONDITIONS_PAGE.VALUE']}</td> <td> <h:inputText id="fileOperatorValue" value="#{pageBean.filePropertyBean.value}" /> </td> </tr> </table> <h:messages/> </h:panelGroup> <!-- ***************** config item count ************************** --> <h:panelGroup id="ConfigItemCountPanel" rendered="#{pageBean.configItemCountKind}"> <h:outputText value="config item count"/> </h:panelGroup> </h:panelGroup> </td> </tr> </table> </span> </ui:composition> </body> </html>
Log:
debug[13:01:11,708]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: change debug[13:01:11,708]: NEW AJAX REQUEST !!! with form :policy_editing_form debug[13:01:11,723]: parameter policy_editing_form:_id63 with value policy_editing_form:_id63 debug[13:01:11,739]: Start XmlHttpRequest debug[13:01:11,739]: Reqest state : 1 debug[13:01:11,801]: QueryString: AJAXREQUEST=_viewRoot&policy_editing_form%3A constraintKindRadio=FILE_PROPERTY&policy_editing_form%3A filePropertyFilePath=&policy_editing_form%3A filePropertyName=&policy_editing_form%3A filePropertyTypeHintOption=LONG&policy_editing_form%3A fileOperatorValue=&policy_editing_form=policy_editing_form &autoScroll=&policy ....... debug[13:01:11,864]: Reqest state : 1 debug[13:01:12,505]: Reqest state : 2 debug[13:01:12,505]: Reqest state : 3 debug[13:01:12,583]: Reqest state : 4 debug[13:01:12,598]: Reqest end with state 4 debug[13:01:12,598]: Response with content-type: text/xml;charset=UTF-8 debug[13:01:12,614]: Full response content: <?xml version="1.0"?> <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/web/a4j.res/org/richfaces/renderkit/html/css/suggestionbox.xcss/DATA/eAFbJaehBAADeAET.jsf" /><script type="text/javascript" src="/web/a4j.res/org.ajax4jsf.framework.ajax.AjaxScript.jsf"> </script><script type="text/javascript" src="/web/a4j.res/org/ajax4jsf/renderkit/html/scripts/form.js.jsf"> </script><script type="text/javascript" src="/web/a4j.res/prototype.js.jsf"> </script><script type="text/javascript" src="/web/a4j.res/org.ajax4jsf.framework.resource.SmartPositionScript.jsf"> </script><script type="text/javascript" src="/web/a4j.res/org/richfaces/renderkit/html/scripts/browser_info.js.jsf"> </script><script type="text/javascript" src="/web/a4j.res/org/richfaces/renderkit/html/scripts/scriptaculo.js.jsf"> </script><script type="text/javascript" src="/web/a4j.res/org/richfaces/renderkit/html/scripts/suggestionbox.js.jsf"> </script><meta name="Ajax-Update-Ids" content="" /><title></title></head><body><span id="ajax-update-ids"><input type="hidden" name="jsf_tree_64" id="jsf_tree_64" value="rO0A<skip>" /><input type="hidden" name="jsf_state_64" id="jsf_state_64" value="rO0ABXVyABNbTGphdmc3<skip>"