0 Replies Latest reply on Nov 9, 2010 10:39 AM by deanhiller

    adding a4j:jsFunction breaks rerendering

    deanhiller

      Issue fixed, a:jsFunction ...found out adding these attributes fixed it for some reason... bypassUpdates="true" ajaxSingle="true"

       

      I read this article on how to fix back browser button

       

      http://solutionsfit.com/blog/2007/11/08/alleviating-client-side-back-button-issues-with-ajax4jsf-and-richfaces/

       

      but I find I have a richfaces page not working in firefox and not working in IE...must be something in richfaces causing this somehow where firefox can't grab what happened.  Anyways, I am trying the solution to solve for both, BUT it turns out after adding that a4j:jsFunction, when the page comes up and I select an item from the first pulldown AND that pulldown tells the submenu pulldown to rerender with it's new value, it does NOT anymore.  It is like adding jsFunction broke my other stuff.

       

      Here is the code(remove the jsFunction and the pulldown menus work again!!!  put it back and they break.  This is a page users constantly use the back browser button to get back to and it doesn't have the previous state the user filled in without a jsFunction type fix or is there another way to reRender without using jsFunction since that is breaking my page????

       

           <a:form id="searchForm">
                  <a:jsFunction name="reloadAjaxPanels" eventsQueue="foo" reRender="searchForm"  />           
                  <rich:panel id="searchPanel" bodyClass="rich-laguna-panel-no-header">

       

                      <s:validateAll>
                          <f:subview id="quickSearch">
                              <h3>Quick Search</h3>

       

                                  <s:div styleClass="blockDivLeft">
                                      <s:decorate id="searchTypeDec2"
                                          template="/web/zlogin/noLabelTemplate.xhtml">
                                          <h:selectOneMenu id="searchType2" value="#{query.searchType}">
                                              <s:selectItems var="s" value="#{queryManager.searchTypes}"
                                                  label="#{s.label}" />
                                              <a:support event="onchange" reRender="searchTypeValueD,errormessages" bypassUpdates="false" ajaxSingle="true" />
                                              <s:convertEnum />
                                          </h:selectOneMenu>
                                      </s:decorate>
                                  </s:div>
                                  <s:div styleClass="blockDivRight" id="searchTypeValueD">
                                      #{queryManager.dateType}
                                      <s:decorate id="searchTypeValueDec"
                                          template="/web/zlogin/noLabelTemplate.xhtml"  rendered="#{not query.searchALL}">
                                          <h:inputText value="#{query.searchId}" id="searchTypeValue"
                                              required="true" validator="limit30Validator">
                                              <a:support event="onblur" ajaxSingle="true"
                                                  reRender="searchTypeValueDec,errormessages" />
                                          </h:inputText>
                                      </s:decorate>
                                      <s:decorate id="dateRangeDec222"
                                          template="/web/zlogin/noLabelTemplate.xhtml">
                                          <h:selectOneMenu id="dateTypeRange" value="#{queryManager.dateType}"
                                              required="true">
                                              <s:selectItems var="s" value="#{queryManager.rangeTypes}"
                                                  label="#{s.label}" />
                                              <s:convertEnum />
                                          </h:selectOneMenu>
                                      </s:decorate>
                                  </s:div>
                             
                              <rich:spacer width="1" height="10" title="Here is a spacer..." />
                              <rich:separator height="1" />
                          </f:subview>