Commit d0f33342 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add getSelectionName and getSelectionIndex


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1273 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 727cdeff
......@@ -81,7 +81,7 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
def __init__(self, method_path=None, params=None, sort_on=None,
uids=None, invert_mode=0, list_url='',
columns=None, checked_uids=None):
columns=None, checked_uids=None, name=None, index=None):
if params is None: params = {}
if sort_on is None: sort_on = []
if uids is None: uids = []
......@@ -99,6 +99,8 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
self.selection_columns = columns
self.selection_sort_on = sort_on
self.selection_checked_uids = checked_uids
self.selection_name = name
self.selection_index = index
self.selection_domain_path = ('portal_categories',)
self.selection_domain_list = ((),)
self.selection_report_path = ('portal_categories',)
......@@ -156,6 +158,20 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
def __getitem__(self, index, REQUEST=None):
return self(REQUEST)[index]
security.declarePublic('getSelectionName')
def getSelectionName(self):
"""
Get the name of this selection.
"""
return self.selection_name
security.declarePublic('getSelectionIndex')
def getSelectionIndex(self):
"""
Get the index of this selection.
"""
return self.selection_index
security.declarePublic('getSelectionParams')
def getSelectionParams(self):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment