[Zope-CMF] My own type - stuck again

Jochen Haeberle listen@midras.de
Wed, 11 Sep 2002 17:06:33 +0200


At 10:43 Uhr -0400 11.09.2002, Tres Seaver wrote:
>On Wed, 2002-09-11 at 10:23, Jochen Haeberle wrote:
>>  Hi,
>>
>>  sorry, it's me again. I am stuck again...
>>
>>  Following up on my problems with extending the existing CMF Document
>>  type with some properties, I finally managed to do a ZCLass, that
>>  inherits from CMFDefault:Document. I can now add it to the portal and
>>  save it - fine!
>
>Great!

It only took about 2 days ;-)
If my ZopeZen rises some more, I will try to add some comments on the 
HowTos about the missing or changed bits

>  > My first problem is that Title and Description (part of DublinCore)
>>  will not get saved, also managing the MetaData works fine.
>>  Anyone knows why this is so?
>
>I don't have that experience (but see below).  Where are you trying to
>edit the Title and Description?

I am using the basic Plone edit-form and would try to add my 
properties there. I did not do anything to the fields and jsut hoped 
the inherited Documtent Class would take care of it...

>  > The second problem comes with my own properties. I added a
>>  propertysheet to my WrapperZClass and the properties I need. I can
>>  show the input fields in my edit_form and get the default-values
>>  fine. But the changed values will not be saved. I thought this might
>>  happen automagically, but no :-(
>>  What do I need to do to get those saved?
>
>What a Biblical question! :)  You need to customize the "form handler"
>script ('document_edit', probably) to take the additional property
>values as arguments, and then call 'manage_changeProperties' on your
>ZClass' propertysheet to update them.

Thanks, I will give it a try :-)

>  > The way to Zen is very hard...
>
>Agreed.

Although I knew that the docs is widespread, my biggest problem is 
that it's not accurate. It seems like many things in Zope, CMF or 
Plone changed and noone updates the HowTos, docs or else...

>
>Tres.
>--
>===============================================================
>Tres Seaver                                tseaver@zope.com
>Zope Corporation      "Zope Dealers"       http://www.zope.com


Thanks alot again
Jochen