5 Replies Latest reply on Dec 4, 2013 3:02 PM by bleathem

    rich:editor and change event

    strannik

      Hi

       

      Does rich:editor support change event handling?

      I took sample from ShowCase but it didn't work. Change event handler is never invoked.

      Although "text" field is updated if user types something in the editor.

       

      <rich:editor value="#{bean.text}">
         <a4j:ajax event="change"
         listener="#{testSession.refresh}" />

          </rich:editor>

        • 1. Re: rich:editor and change event
          michpetrov

          The change event seems to be very unfortunately named. It doesn't fire when you change something in a component, it fires when the component loses focus and something has changed (ie. if you click somewhere else or submit the form). In case of the rich:editor you want to use the dirty event.

          1 of 1 people found this helpful
          • 2. Re: rich:editor and change event
            strannik

            Thank you, Michal.

             

            Unfortunately it doesn't work either. If I try the code below the listener is never invoked.

            Although the "text" field is submitted each time I press key in the editor.

             

            <rich:editor value="#{bean.text}">
                      <a4j:ajax event="dirty" listener="#{testSession.refresh()}" />

                </rich:editor>

            • 3. Re: rich:editor and change event
              bleathem

              If you look in your browser console, do you see any network communications initiated as you type?

              • 4. Re: rich:editor and change event
                strannik

                Hi, Brian

                 

                Yes, there is a postback each time I type in the editor. I assume it updates the #{bean.text} field.

                • 5. Re: rich:editor and change event
                  bleathem

                  What version of RichFaces are you using?  We did some "event re-targeting" a few minor releases back that should have enabled this functionality.