def __init__(self, req, value=None, href=None,onclick=None,pop=None,items=[],toggle=None,parent=None): StandardController.__init__(self,req,createContent=False,parent=parent) self.value = value self.href = href self.onclick = onclick self.items = [] self.toggle = toggle if not pop: pop = self.UP_LEFT assert(pop in (self.LEFT_UP,self.LEFT_DOWN,self.UP_LEFT,self.UP_RIGHT,self.RIGHT_UP,self.RIGHT_DOWN,self.DOWN_LEFT,self.DOWN_RIGHT)) self.pop = pop self.addItems(*items)
def __init__(self,req,name=None,applyButton='Apply',defaultButton='Default',omitFormTag=False,parent=None): StandardController.__init__(self,req,createContent=False,parent=parent) self.name = name self.hiddenVars = {} self.items = [] self.itemsMap = {} self.hasBadInput = False self.applyButton = applyButton self.defaultButton = defaultButton self.omitFormTag = omitFormTag self.unique = hash(name)
def __init__(self, req, name, title=None, dbOrder=True, showHeaders=True,className='standardTable',emptyMessage='No Data Found',extraFooter=None,extraFooterClass='',enableExport=False): StandardController.__init__(self,req,createContent=False) self.name = name self._headers = [] self._snames = [] self._rows = [] self.dbOrder = dbOrder self._sortCalced = False self.title = self.escape(title) self.hasFooter = False self.showHeaders = showHeaders self.className = className self._emptyMessage = emptyMessage self.extraFooter = extraFooter self.extraFooterClass = extraFooterClass self.formatTable = True self.enableExport = enableExport
def getContent(self): import csv self.formatTable = False self.createContent() self.csvWriter = csv.writer(self.req) return StandardController.getContent(self)
def getContent(self,shadowdrop=True): if shadowdrop: return self.shadowdrop(self.getContent(shadowdrop=False)) self.createContent() return StandardController.getContent(self)
def __init__(self, req, title): StandardController.__init__(self,req,createContent=False) self.title = self.escape(title) self._rows = []