1 Reply Latest reply on May 29, 2008 8:38 AM by Stefan Cordes

    Elements are not removed when rendered becomes false

    Stefan Cordes Newbie

      When trying to do a simple show hide via rendered=#{..} (concerning the a4j:outputPanel issue, I recognized that once made visible components won't disappear when rendered becomes false.

      This BUG is true for you livedemo, too:

      Enter
      http://livedemo.exadel.com/richfaces-demo/richfaces/outputPanel.jsf;jsessionid=2D3D82BFF489B16527856F6A4830FE27?c=outputPanel

      Goto the second text field and type shift key
      (nothing happens but an ajax-event is send to the server see ajax-request below)
      Type in a character "1" and remove it
      (the text "Approved Text:" appears).
      Now delete the 1 and again type shift key
      (the text "Approved Text: 1" stays on screen even though rendered=false)
      Even the "1" stays on screen and now is not consistent to the textfield.

      Does anyone know a workaround for that?

      Always this ajax-response is send (and so the browser cannot know to hide the element):

      ....><body><span id="j_id233"></span><meta name="Ajax-Update-Ids" content="j_id233" />
      <span id="ajax-view-state"><input type="hidden" name="javax.faces.ViewState"
      id="javax.faces.ViewState" value="j_id1" /></span>
      <meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
      


      This is the response that came after typing the "1":
      ....><body><span id="j_id233"></span><span id="out2">Approved Text: 1</span>
      <meta name="Ajax-Update-Ids" content="j_id233,out2" /><span id="ajax-view-state"><input type="hidden"
      name="javax.faces.ViewState" id="javax.faces.ViewState" value="j_id1" />
      </span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body>