I have a Specialist ('OrderingEntities') which creates virtual 
objects, mapped to existing objects (using ZClass 'Employee') in 
another Specialist ('Employees'). I want OrderingEntities to add and 
modify a property 'current_order_id' on the Employee objects. I can 
get the virtual object to access properties from the real object, but 
I can't figure out how to implement the property add/change.

To make things simpler, I added the property current_order_id to the 
Employee class, so I can test just modifying this property, leaving 
creating it for later.

OrderingEntities has an employeeRack, set to use the Employee class 
and to load by accessing attribute current_order_id. The Rack has 
this SkinScript:

     WITH Employees.getItem(self.id) COMPUTE
     original_object=RESULT or NOT_FOUND

     WITH self.original_object COMPUTE


Doing <dtml-var 
"OrderingEntities.getItem(some_id).current_order_id)"> shows me the 
value of current_order_id of the Employee object some_id. But I can't 
figure out how to change the property so it get changed in the 
Employee object. <dtml-call 
does nothing, it doesn't even trigger the WHEN OBJECT CHANGED line 
(not that I really expected it to work... this object is virtual, how 
can I call changeProperties on it?)

Other than figuring out how to get the change to work, I two more problems:

-Eventually the OrderingEntities Specialist will have several Racks 
mapping to several other Specialists, so it will end up returning 
different classes. Should I instead create a new ZClass with just the 
current_order_id property and use this class in all the virtual Racks?

- How do I add a property to the original object from the virtual 
object (assuming I did not add it manually to the Employee class)? Do 
I call self.original_object.manage_addProperty(...) from the 

Itai Tavor                    "Je sautille, donc je suis."
C3Works    [EMAIL PROTECTED]              - Kermit the Frog

"If you haven't got your health, you haven't got anything"

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

Reply via email to