2 from Products
.CMFCore
.utils
import getToolByName
4 uidtool
= getToolByName(context
, 'portal_uidhandler')
5 utool
= getToolByName(context
, 'portal_url')
6 portal
= utool
.getPortalObject()
7 uid
= uidtool
.register(context
)
9 sd
= context
.session_data_manager
.getSessionData(create
= 1)
11 selection
= sd
.get('objects_selection', [])
12 selDict
= sd
.get('objects_selection_dict', {})
14 lightboxpath
= sd
.get('lightboxpath', None)
15 selectionIsLightbox
= False
16 if lightboxpath
is None :
17 selection
= sd
.get('objects_selection', [])
20 lightbox
= portal
.restrictedTraverse(lightboxpath
)
21 selection
= lightbox
.getUidList()
22 selectionIsLightbox
= True
24 sd
.set('lightboxpath', None)
25 selection
= sd
.get('objects_selection', [])
29 if selDict
.has_key(uid
) :
32 if selectionIsLightbox
:
34 sd
['objects_selection'] = selection
35 sd
['objects_selection_dict'] = selDict
38 return context
.REQUEST
.RESPONSE
.redirect('%s/selection_view' % utool())