4 Replies Latest reply on Mar 17, 2009 7:55 AM by Nick Belaevski

    Definition of limitToList

    Steffen Dienst Newbie

      Hi,

      I have a question about limitToList. I have a form with an a4j:commandLink that rerenders and opens a modalPanel. I would like to restrict the rerender to that dialog, so I use "limitToList=true". Using FireBug I can see, that the ajaxRendered outputPanel gets rerendered too.

      <meta name="Ajax-Update-Ids" content="iAmAjaxRendered,myDialog" />
      

      If I understood the documentation right this is not supposed to happen, or is it?

      Pagecode:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      <jsp:root xmlns="http://www.w3.org/1999/xhtml"
       xmlns:jsp="http://java.sun.com/JSP/Page"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:t="http://myfaces.apache.org/tomahawk"
       xmlns:sid="http://spice.automation.siemens.com/sid" version="2.0">
      
       <ui:component>
      
       <body>
      
       <a4j:form id="testForm">
      
       <a4j:commandLink
       id="commandlink"
       actionListener="#{SomeCommandBean.doSomething}"
       oncomplete="Richfaces.showModalPanel('myDialog')"
       reRender="myDialog" limitToList="true">
       Click me
       </a4j:commandLink>
       </a4j:form>
      
       <a4j:outputPanel ajaxRendered="true"
       id="iAmAjaxRendered"
       layout="block">
       <h:outputText value="I get rendered on every click although it should not happen." />
       </a4j:outputPanel>
      
       <rich:modalPanel id="myDialog">
       Dummy content<br />
       <h:outputLink value="#" id="myDialog_close">
       <h:outputText value="close" />
       </h:outputLink>
       <rich:componentControl for="myDialog" attachTo="myDialog_close"
       operation="hide" event="onclick" />
       </rich:modalPanel>
      
       </body>
       </ui:component>
      </jsp:root>