2 Replies Latest reply on Jun 30, 2009 2:14 AM by Christian Bender

    rich:panel loosing css-style on rerender

    Christian Bender Newbie

      Hello,

      i'm using a rich:panel in a ajax-rendered output-panel and apply css-styles to it using javascript.

      document.getElementById('form:output').style.maxHeight = rest + "px";
      


      This seems to work quite well as long as i don't change the content of the panel. Then all the css-styles are getting lost and the panel is rerendered. Is there a way to prevent richfaces from removing the css-styles? Or is there a way to execute a javascript when the rerendering of the element finishes?

       <a4j:outputPanel ajaxRendered="true">
       <rich:panel id="output" style="overflow:auto" header="#{MessageReadSessionBean.currentMessage.betreff}">
       <h:outputText escape="false" value="#{MessageReadSessionBean.currentMessage.inhalt}" />
       </rich:panel>
       </a4j:outputPanel>