2 Replies Latest reply on Oct 1, 2012 11:48 AM by swampdev

    problem with rich:editor

    Martin Borovnik Newbie

      first: hi, i'm new here and hope, you can help me sometimes

       

      my problem:

       

      i have an extendedTable with the column description for some products.

      when i click on the column, i open the rich:editor to edit the description. the problem is, that the editor only shows the value from the column i selected first and after that, he doesn't update the value, when i select another row.

      i have a class, that holds the selected product, from where i get the value for the editor. this class works and changes the value.

      i only have to update the value of the editor, can you tell me please, how i can do that?

       

      this is the column:

       

      <rich:column>

         <f:facet name="header">Beschreibung</f:facet>

         <a4j:outputPanel onclick="#{rich:component('editorPane')}.show()">

            <h:outputText value=" #{_product.description}">

            </h:outputText>

         </a4j:outputPanel>

      </rich:column>

       

      and here is the editor-code:

       

      <rich:popupPanel header="Description" id="editorPane"

                  domElementAttachment="parent" width="800" height="600">

                  <h:outputText

                      value="#{productController.selectedProduct.description}">">

                  </h:outputText>

                  <rich:editor id="editor"

                      value="#{productController.selectedProduct.description}" immediate="true">

                  </rich:editor>

       

                  <a4j:commandButton value="Cancel"

                      onclick="#{rich:component('editorPane')}.hide(); return false;" />

              </rich:popupPanel>

       

      thx for your help!

        • 1. Re: problem with rich:editor
          Martin Borovnik Newbie

          hi,

          no answer  for me?

          why? less information? stupid question? i need your help!

          thx,

          martin

          • 2. Re: problem with rich:editor
            swampdev Newbie

            Martin, when I do this type of action in richfaces, I always excplicitely set execute="id's I need submitted", render="id's I need (re)rendered"  Those attributes (execute and render) are only availabe in ajax action componenets (i.e a4j:commandButton, a4j:commandLink, a4j:jsFunction, etc).  So when you open and close your popup use on of those action components (i.e <a4j:commandButton value="Click to edit" execute="@this" render="editorPane" oncomplete="#{rich:component('editorPane')}.show();" />)  Then on the button used to close the popup, submit (execute) your editor, and render your outputpanel (which you should give an id to).  Hope that helps.