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

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

    Rena Yamamoto Newbie

      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.