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.
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to