[Zope-CMF] validateMetadata

Antwan Reijnen antwan@dexus.nl
Thu, 03 Jan 2002 11:36:27 +0100


Hi Tres,

your help is very much appreciated, thanks again. 

I wonder however: suppose the metadata is not valid. I first have to store it, and ony AFTER storing takes place, I can test it.

Is there for that situation a way to rollback the editMetadata call? I'm not a undo / rollback-expert :-) so sorry for asking the obvious.

Greetings, Antwan.

At 13:28 31-12-01 -0500, you wrote:
>Antwan Reijnen wrote:
>
>>I have a question: is validateMetadata in the portal_metadata
>>tool ever called? Should I call it myself when editing my metadata?
>>Because: If I setup a required subject in portal_metadata, with an
>>enforced vocabulary, and I enter a random subject (not in the
>>vocabulary), this subject is stored normally. No MetadataError or
>>other compaints are raised here...
>>Any help or pointers are appreciated.
>
>
>Your suspicion is correct;  the method is not called by any
>"out-of-the-box" CMF skins.  I would customize the 'metadata_edit'
>PythonScript and have it call 'validateMetadata' after calling
>'editMetadata'.
>
>
>>Greetings, HAPPY NEWYEAR!!!
>
>
>To you and yours, as well.
>
>
>Tres.
>-- 
>===============================================================
>Tres Seaver                                tseaver@zope.com
>Zope Corporation      "Zope Dealers"       http://www.zope.com
>
>
>_______________________________________________
>Zope-CMF maillist  -  Zope-CMF@zope.org
>http://lists.zope.org/mailman/listinfo/zope-cmf
>
>See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests


Antwan Reijnen

DEXUS New Media
Metropole Office 
Laan van Meerdervoort 70 
2517 AN Den Haag
Tel 070-3114800 
Fax 070-3656279 
http://www.dexus.nl

DEXUS New Media maakt deel uit van de Metropole IT Group 
http://www.metropole-it.nl 

ICQ#: 7916222