Re: [Zope-dev] Reg. persisting data in ZODB via forms

Joe Steeve <[email protected]>
Newsgroups gmane.comp.web.zope.bluebream,gmane.comp.web.zope.devel
Organization HiPro IT Solutions Pvt. Ltd.
Message-ID <1307523949.2040.12.camel@lark>
Hello Charlie,

On Wed, 2011-06-08 at 10:48 +0200, Charlie Clark wrote:
> From memory I can recall something similar related to making changes
> to copies of instance attributes but failing to apply them to
> attributes and needing to specifically go context.attribute =
> form_result for the changes to persist.

Supposing, we have a form action like:

        @form.action('Apply')
        def handle_edit(self, action, data):
        	self.context.name += "Blah"
        
This change is visible in subsequent requests. i.e if we view this
object via another form, we can see the modification. However, if we
restart the server (bluebream), this change is lost. The same thing
happens when we use "form.applyData". If we 'notify'
ObjectModifiedEvent, this does not happen.

Since the object's modification is visible across requests, I am
assuming that the transaction mechanism 'did' apply the changes to the
object.

But, it did not get to the disk :-/

-- 
Joe Steeve
HiPro IT Solutions Pvt. Ltd.
http://hipro.co.in/
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAk3vO2oACgkQ6FrXDx3swEOuygCffqUa/tKAZSVCVu+s/VDGUIm5
gWAAnRD0mX58ZlXhY8RtGVFHeYvzEvoP
=IKeb
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.