[CPS-devel] Proxies and interfaces

Santi Camps scamps at earcon.com
Thu Jun 29 12:06:41 CEST 2006


Hi all,

I'm beginning to develop over CPS 3.4, and I'm trying to use Five when
possible.   I have a custom page, showing some specific content in the
main slot.   This page only has sense applied to one content type, so
I register the page that way:

  <browser:page
      for=".interfaces.IMyInterface"
      template="www/myPage.zpt"
      name="myPage.html"
      permission="zope2.View"
      />

But my content type is created using CPSSchema's, and it's proxied.
So, when I call
workspaces/resources/my-object/myPage.html, a Not Found is raised.
But when I call
portal_repository/2070145404__0001/myPage.html, works fine.

The reason is obvious, the object in portal_repository is registered
to really implement IMyInterface, when the other object is a Proxy,
not registered to implement that interface.  The question is, is there
any workarround for this (other than registering the page for="*", of
course) ?   Could the CPSProxy object, in some way, register the
interfaces of the objects it is proxying to ?

Thanks in advance
-- 
Santi Camps
Earcon S.L. - http://www.earcon.com
                  - http://www.kmkey.com


More information about the cps-devel mailing list

This list archive provided by Nuxeo, the leaders of open source ECM. Check out the Nuxeo 5 open source, standards-based ECM project.