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:
parent
ca4efe3d37
commit
bac5792e51
1 changed files with 5 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue