Sidnei da Silva writes:
I wish to look at default properties of my custom object when creating the addObjectForm.
There is any way to do this? Something like: <dtml-var "Products.MyProduct.Custom.default_title"> With
<ObjectManager instance>.manage_addProduct[<Product Name>] you get the product dispatcher for your product. It has access to all product functions registered as "constructor"s. Now, "constructor" is a misnomer: You can register any function as a "constructor". Only the first "constructor" has a special meaning: it is used as target in the "add" list... This provides for the following solution: Define a function "getDefaults" in your product that returns a dictionary with the defaults. Register is as a constructor (not the first one!). Call it as "manage_addProduct['your product'].getDefaults()" and use the default values you need. Inside a constructor, you are already in the dispatcher context, thus you can directly call "getDefaults". The factory dispatcher can access some specially declared fürther objects in the product. Look at the code in "App.ProductDispatcher" (maybe "App.FactoryDispatcher", or something like that), for details. Dieter