[Product-Developers] RichTextWidget wysiwyg editor not displaying actual value after action

Régis Rouet regis.rouet at bpi.fr
Mon Mar 19 07:11:27 UTC 2012


Hi,

I try to have a reset button on a customized dexterity.EditForm
to set a RichText field with a computed value while staying on the edit
form.

For example :

class EditForm(dexterity.EditForm):
    grok.context(IScreening)
    z3cform.extends(dexterity.EditForm)
    
    def updateWidgets(self):
        super(EditForm, self).updateWidgets()

    @button.buttonAndHandler(u'Reset', name='reset')
    def handle_reset(self, action):
        data, errors = self.extractData()
        data['user_text'] = u'reset' + '   ' + datetime.now().isoformat()
        self.applyChanges(data)
        self.updateWidgets()

The problem is that the wysiwyg editor keep displaying the old value.
If I click on the "edit without wysiwyg editor" link, I then get the actual
value.

I'm new to z3c.form and not sure to have a correct code.

Any opinion ?

I use Plone 4.1.4 and dexterity 1.2.

--
View this message in context: http://plone.293351.n2.nabble.com/RichTextWidget-wysiwyg-editor-not-displaying-actual-value-after-action-tp7384800p7384800.html
Sent from the Product Developers mailing list archive at Nabble.com.


More information about the Product-Developers mailing list