def __init__(self, var, list=None) : iServer = Holder.getiServer() r = Holder.getRequest() self.__d = iServer.findDialog(r, var["J_DIALOGNAME"]) self.iN = Holder.getResolveName() if list == None : return self.fList = self.__d.getDialog().findList(list) assert self.fList != None, "Cannot find list " + list + " in the dialog " + var["J_DIALOGNAME"]
def __init__(self, var, list=None): iServer = Holder.getiServer() r = Holder.getRequest() self.__d = iServer.findDialog(r, var["J_DIALOGNAME"]) self.iN = Holder.getResolveName() if list == None: return self.fList = self.__d.getDialog().findList(list) assert self.fList != None, "Cannot find list " + list + " in the dialog " + var[ "J_DIALOGNAME"]
def getMapFieldList(dialogName,list=None): """ Extract list of fields (columns) name from dialog Args: dialogName : dialog list : if None list of fields from dialog if not None list of columns from list """ i = Holder.getiServer() dInfo = i.findDialog(Holder.getRequest(), dialogName) assert dInfo != None dFormat = dInfo.getDialog() if list == None : flist = dFormat.getFieldList() else : lform = dFormat.findList(list) assert lform != None flist = lform.getColumns() l = [] for f in flist : name = f.getId() l.append(name) return l
def urlPar(var, k): R = Holder.getRequest().getUrlParam() return R.get(k)
def urlParList(var): R = Holder.getRequest().getUrlParam() res = [] for k in R: res.append(k) return res
def urlPar(var, k) : R = Holder.getRequest().getUrlParam() return R.get(k)
def urlParList(var) : R = Holder.getRequest().getUrlParam() res = [] for k in R : res.append(k) return res
def getDialogFormat(dialname): i = Holder.getiServer() dInfo = i.findDialog(Holder.getRequest(), dialname) assert dInfo != None return dInfo.getDialog()