本文整理汇总了Python中com.jythonui.server.holder.Holder类的典型用法代码示例。如果您正苦于以下问题:Python Holder类的具体用法?Python Holder怎么用?Python Holder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Holder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: getDict
def getDict(what) :
if what == "countries" : return Holder.getListOfCountries().getList()
if what == "titles" : return Holder.getListOfTitles().getList()
if what == "idtypes" : return Holder.getListOfIdTypes().getList()
if what == "payments" : return Holder.getListOfPayment().getList()
if what == "roles" : return Holder.IGetListOfDefaultRoles().getList()
if what == "vat" : return Holder.IGetListOfVat().getList()
示例2: __init__
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"]
示例3: _toMapF
def _toMapF(xmls,lid,lil):
x = Holder.getMapXML();
iR = x.getMap(xmls)
rmap = _toMap(iR.getMap(),lid)
li = []
for m in iR.getList() :
li.append(_toMap(m,lil))
return (rmap,li)
示例4: fileToS
def fileToS(dir,filename=None):
if filename == None :
filename = dir
dir = None
# iS = Holder.getIJython().getResource().getRes(filename)
iS = Holder.getFindResource().getFirstURL(dir, filename)
s = BUtil.readFromFileInput(iS.openStream())
return s
示例5: createPDF1
def createPDF1(var) :
# s = Util.getResourceAsDirectory("docs")
# print s
# fis = FileReader( s + "/Sample.html")
iS = Holder.getIJython().getResource().getRes("docs/Sample.html")
# s = Util.readFromFileInput(iS.openStream())
map = {}
map[pdfutil.AUTHOR] = "betterThanZero"
map[pdfutil.CREATOR] = ""
map[pdfutil.TITLE] = "Demo for iText XMLWorker"
return pdfutil.createPDF(iS.openStream(),map)
示例6: getMapFieldList
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
示例7: verifyXML
def verifyXML(xsdfile, xml):
""" Verify xml file with xsd schema.
Important: it is expected that schema match xml, used only for internal checking
Args:
xsdfile : the name of xsd (schme) file, file is read from dialog/xsd directory
xml : xml string (important: string, not file name)
Returns:
returns if schema match the xml, if not breaks program
Raise :
run time exception if not match, not match is not expected
"""
i = Holder.getXMLVerifies()
ok = i.verify("xsd", xsdfile, xml)
assert ok
示例8: getVar
def getVar(map,dialogname,xml,listv):
""" Set map with values read from xml string for dialog form.
Retrieves values from XML string and set values to the map (key->value).
Retrieves values only for list of keys (not for all found in XML string)
Args:
map : A map being set. Can be empty or contains some values already. In case of
conflict new value will overwrite existing value.
dialogname : Dialog name where form is available.
xml : XML string to be analyzed.
listv : List of keys to be set to the map. Only keys found in the list are set.
Others are ignored.
"""
iXml = Holder.getXMLTransformer();
v = DialogVariables();
iXml.fromXML(dialogname,v,xml);
for vname in listv :
val = v.getValue(vname)
if val == None or val.getValue() == None:
map[vname] = None
continue
if val.getType() == TT.STRING :
map[vname] = val.getValueS()
continue
if val.getType() == TT.BIGDECIMAL :
b = val.getValueBD()
map[vname] = con.BigDecimalToDecimal(b)
continue
if val.getType() == TT.BOOLEAN :
b = val.getValueB()
map[vname] = b
continue
if val.getType() == TT.INT :
map[vname] = val.getValue()
continue
if val.getType() == TT.DATE :
map[vname] = con.toJDate(val.getValue())
continue
if val.getType() == TT.DATETIME :
map[vname] = con.toJDateTime(val.getValue())
continue
示例9: getMailList
def getMailList(fromm = -1,to = 0):
""" get list of mail from input box
Args:
fromm : the number of first mail to retrieve (counting from end)
to : the number of last mail to retrieve (-1 : all mails)
Returns:
List of mails
Element in the list:
getHeader()
getContent()
getFrom()
isText()
isIsSeen()
getSentDate()
getPerson()
"""
iG = Holder.getGetMail()
res = iG.getMail(fromm,to)
assert res.getErrMess() == None
return res.getList()
示例10: getObject
def getObject(var=None):
return Holder.getO()
示例11: getPerson
def getPerson(var):
token = var["SECURITY_TOKEN"]
# return Holder.getNameFromToken().getInstance(token).getPerson()
return Holder.getiSec().getUserName(token)
示例12: getAppId
def getAppId(var):
token = var["SECURITY_TOKEN"]
return Holder.getNameFromToken().getInstance(token)
示例13: __init__
def __init__(self,var):
self.var = var
self.p = Holder.getMailFrom()
示例14: getDictFromFile
def getDictFromFile(dire, dictname) :
i = Holder.getReadDict()
seq = i.getDict(dire, dictname)
return seq
示例15: __init__
def __init__(self,app) :
ObjectAdmin.__init__(self,app)
self.adminI = Holder.getAdminPerson()