2 Replies Latest reply on Feb 19, 2009 8:54 AM by nbelaevski

    how to clear input for rich:editor after ajax submit?

    renayams

      Does anybody know how to clear the rich:editor input value after an ajax submit (eg using javascript) without calling a rerender on the editor?

      Example:

       <rich:editor id="post"
       label="#{msgs.postLabel}"
       value="#{addGlomPostForm.glomPost.post}"
       configuration="richeditor"
       height="50"
       width="400"
       required="true"
       binding="#{addGlomPostForm.postInput}"
       />
       <rich:message id="postMsg" for="post" styleClass="errMsg" />
      
       <a4j:commandButton value="#{msgs.addPostLabel}"
       action="#{addGlomPostForm.procAddGlomPostAjax}"
       reRender="viewGlomPanel">
       </a4j:commandButton>
      


      I've tried calling onsave="#{rich:element('post')}.value='';" in <rich:editor> and oncomplete="#{rich:element('post')}.value='';" in the <a4j:commandButton>, but neither works. Anyone have suggestions? Thanks.