[gen] Bugfixes.

This commit is contained in:
Gaetan Delannay 2015-02-17 08:58:04 +01:00
parent f842c0ce02
commit 8b90d877a8
12 changed files with 92 additions and 74 deletions

View file

@ -226,6 +226,7 @@ class ToolMixin(BaseMixin):
'''Returns the list of root classes for this application'''
cfg = self.getProductConfig().appConfig
rootClasses = cfg.rootClasses
if rootClasses == None: return [] # No root class at all
if not rootClasses:
# We consider every class as being a root class
rootClasses = self.getProductConfig().appClassNames
@ -259,19 +260,6 @@ class ToolMixin(BaseMixin):
fields.append(field)
return Object(fields=fields, nbOfColumns=nbOfColumns)
queryParamNames = ('className', 'search', 'sortKey', 'sortOrder',
'filterKey', 'filterValue')
def getQueryInfo(self):
'''If we are showing search results, this method encodes in a string all
the params in the request that are required for re-triggering the
search.'''
rq = self.REQUEST
res = ''
if rq.has_key('search'):
res = ';'.join([rq.get(key,'').replace(';','') \
for key in self.queryParamNames])
return res
def showPortlet(self, obj, layoutType):
'''When must the portlet be shown? p_obj and p_layoutType can be None
if we are not browing any objet (ie, we are on the home page).'''