record newly created resources in adapter for further use by calling view

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3224 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2009-02-10 15:08:40 +00:00
parent ca4efe3d37
commit bac5792e51

View file

@ -59,9 +59,11 @@ class ExternalCollectionAdapter(AdapterBase):
implements(IExternalCollection)
adapts(IConcept)
_adapterAttributes = ('context', '__parent__', 'exclude')
_adapterAttributes = ('context', '__parent__', 'exclude', 'newResources')
_contextAttributes = list(IExternalCollection) + list(IConcept)
newResources = None
def getExclude(self):
return getattr(self.context, '_exclude', None) or []
def setExclude(self, value):
@ -87,8 +89,8 @@ class ExternalCollectionAdapter(AdapterBase):
else:
new.append(addr)
if new:
newResources = provider.createExtFileObjects(self, new)
for r in newResources:
self.newResources = provider.createExtFileObjects(self, new)
for r in self.newResources:
self.context.assignResource(r)
for addr in old:
if addr not in oldFound: