6 Replies Latest reply on Apr 10, 2007 10:32 AM by sergeysmirnov

    reRender in a4j:support does not work for specific selectOne

    shooali

      Hi,

      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>"


        • 1. Re: reRender in a4j:support does not work for specific selec
          shooali

          sorry for the end of the log, here is the relevant rest of it;

          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"?>







          <input type="hidden" name="jsf_state_64" id="jsf_state_64" value="rO0ABX"

          • 2. Re: reRender in a4j:support does not work for specific selec
            shooali

            Sorry again:

            BTW, how can I delete or edit a post like this?

            debug[14:33:48,031]: Header Ajax-Update-Ids not found, search in
            debug[14:33:48,031]: search for elements by name 'meta' in element #document
            debug[14:33:48,031]: selectNodes found 2
            debug[14:33:48,031]: Find
            warn[14:33:48,031]: No information in response about elements to replace
            debug[14:33:48,031]: call selectSingleNode for id= ajax-update-ids
            debug[14:33:48,031]: Hidden JSF state fields:
            debug[14:33:48,031]: search for elements by name 'input' in element span
            debug[14:33:48,031]: selectNodes found 3
            debug[14:33:48,031]: Replace value for inputs: 19 by new values: 3
            debug[14:33:48,031]: Input in response: jsf_tree_64
            debug[14:33:48,047]: Found same input on page with type: hidden
            debug[14:33:48,047]: Found same input on page with type: hidden
            debug[14:33:48,047]: Input in response: jsf_state_64
            debug[14:33:48,047]: Found same input on page with type: hidden
            debug[14:33:48,094]: Found same input on page with type: hidden
            debug[14:33:48,141]: Input in response: jsf_viewid
            debug[14:33:48,156]: Found same input on page with type: hidden
            debug[14:33:48,156]: Found same input on page with type: hidden
            debug[14:33:48,156]: search for elements by name 'INPUT' in element span
            debug[14:33:48,156]: selectNodes found 0
            debug[14:33:48,156]: Replace value for inputs: 19 by new values: 0

            • 3. Re: reRender in a4j:support does not work for specific selec
              ilya_shaikovsky

              Sorry but I'm not able to see the form around submited code. Ajax request require that as common ones. (or this page is included one?)

              2) wrap your messages inside <a4j:outputPanel ajaxRendered="true"> to look for possible errors.

              3) If nothing helps you may send your case directly to test it on my side.

              • 4. Re: reRender in a4j:support does not work for specific selec

                 

                "shooali" wrote:
                Sorry again:

                BTW, how can I delete or edit a post like this?



                you cannot do it. However, you can prevent it using the preview button before posting.

                • 5. Re: reRender in a4j:support does not work for specific selec
                  shooali

                  sorry for the delay.

                  1. it is included and there is a form surrounding. same code works fine a few lines above.

                  2. I did, the only error message I can see is:
                  warn[14:33:48,031]: No information in response about elements to replace

                  3. how to send it directly? I have included the page fully here.

                  thanks,

                  • 6. Re: reRender in a4j:support does not work for specific selec

                     

                    "shooali" wrote:

                    3. how to send it directly? I have included the page fully here.


                    You can add an attachment to the jira issue. If no jira issue is created for your case, create it by yourself