1 Reply Latest reply on Sep 28, 2012 3:57 PM by Greg C

    difference between reRender and refresh

    omid pourhadi Apprentice

      Hi,

       

      I create a tree with drag and drop but when i drag an item,  i need to refresh page to see changes and reRender has no effect.

       

      here are codes

       

       

      <rich:tree showConnectingLines="false"
                      reRender="treePanel"             
                      dragIndicator="epsTreeIndicator"
                      id="epsTree" 
                      ajaxSubmitSelection="false" switchType="client"
                      dropListener="#{epsTreeSearch.processDrop}"
                      adviseNodeOpened="#{epsTreeSearch.adviseNodeOpened}"
                      >
                      <a:support event="oncomplete" ajaxSingle="false" reRender="treeForm, treePanel, epsTree"/>      //doesn't work              
                      <a:support event="oncomplete" ajaxSingle="false" oncomplete="javascript:location.reload(true)"/> // this works but it's not ajax
                      <rich:recursiveTreeNodesAdaptor  recursionOrder="first" roots="#{rootWbs}" var="_item" nodes="#{_item.children}" >
                          <rich:treeNode acceptedTypes="projwbs" dropValue="#{_item}" dragType="projwbs" reRender="epsTree" 
                          dragValue="#{_item}" rendered="#{empty from}" dropListener="#{epsTreeSearch.processDrop}">
                              <s:link value="#{_item.wbsName}" view="/member/eps/epsEdit.xhtml">
                                  <f:param name="epsId" value="#{_item.id}"/>
                              </s:link>
                              <rich:dndParam name="label" type="drag" value="#{_item.wbsName}" />
                          </rich:treeNode>
                          
                          
                          
                      </rich:recursiveTreeNodesAdaptor>
                                      
                  </rich:tree>
      

       

      I have no idea what's happening I even rerender component via code

       

      FacesContext fc = FacesContext.getCurrentInstance();
                  AjaxContext ac = AjaxContext.getCurrentInstance();
                  UIComponent destTree = fc.getViewRoot().findComponent(componentName);
                  ac.addComponentToAjaxRender(destTree);
      

      I'm wondering what's the difference since both of them use identical  query ?