Re: [Zope] Managing subobjects

2000-08-16 Thread Dieter Maurer

[EMAIL PROTECTED] writes:
  I created a ZClass, zRow.  This class can contain other ZClass: zField_Text,
  zField_Date, etc.
  This let me define the columns contained in a zRow.
  I then defined a Class zTable, wich contains zRows.
  
  Question:
  
   -  In my manage tabs, I needed a have a tab "Define columns".  Do
  achieve this, I inserted a ZRow Instace (with id Definition) in my zTable
  product definition, and a method called Define_Columns, containing:
  
  dtml-with Definition
dtml-var manage_main
  /dtml-with
  
   And I defined a view "Define Columns" pointing to that method.  When
  i click on the "Define Columns", I can see the manage screen of the instance
  "Definition", that's what I wantwd.
  
   But when Add a zField, the instance is create in the zTable level,
  not IN Definition instance!  All the classes are Based on CatalogAware,
  ObjectManager.
There are 2 hierarchies, the object hierarchy in Zope
and the URL hierarchy used by the browser.

Usually, these two hierarchies are magically in sync.
However, it is easy to change this.

In your case:
  the "with Definition" changes (in some way) the current location in
  Zope's object hiararchy. However, the current location
  in the URL hierarchy is not changed.

  When you press "add", an HTTP request is generated, almost
  surely with a relative URL, i.e. relative to the current
  location in the URL hierarchy.

  Obviously, your add method is called in the wrong context
  (or maybe, the add method of the wrong object is called).

  You may succeed, when you change the location in the
  URL hierarchy, too.
  You do this with a "RESPONSE.setBase(newBase)".


Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Managing subobjects

2000-08-15 Thread Menard . Jean-Francois

(I speak frech, sorry for my english!)
I created a ZClass, zRow.  This class can contain other ZClass: zField_Text,
zField_Date, etc.
This let me define the columns contained in a zRow.
I then defined a Class zTable, wich contains zRows.

Question:

-  In my manage tabs, I needed a have a tab "Define columns".  Do
achieve this, I inserted a ZRow Instace (with id Definition) in my zTable
product definition, and a method called Define_Columns, containing:

dtml-with Definition
  dtml-var manage_main
/dtml-with

And I defined a view "Define Columns" pointing to that method.  When
i click on the "Define Columns", I can see the manage screen of the instance
"Definition", that's what I wantwd.

But when Add a zField, the instance is create in the zTable level,
not IN Definition instance!  All the classes are Based on CatalogAware,
ObjectManager.

Any ideas how to fix that?  Any sugestion how I could implement
this?

Jean-François Ménard
Intranet DPAS
Pratiques d'affaires et orientations
*(514) 840-3000  poste 3939
*  (514) 840-5585
*  [EMAIL PROTECTED]
* 855 Ste-Catherine est, 6e étage
  Montréal, Qué. H2L 4P5


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )