当前位置: 首页>>代码示例>>Python>>正文


Python holder.Holder类代码示例

本文整理汇总了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()
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:7,代码来源:cutil.py

示例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"] 
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:8,代码来源:cutil.py

示例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)
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:8,代码来源:xmlutil.py

示例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
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:8,代码来源:xmlutil.py

示例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)
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:12,代码来源:listattach.py

示例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    
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:24,代码来源:miscutil.py

示例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
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:18,代码来源:cutil.py

示例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         
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:42,代码来源:xmlutil.py

示例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()
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:20,代码来源:cmail.py

示例10: getObject

def getObject(var=None):
    return Holder.getO()
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:2,代码来源:cutil.py

示例11: getPerson

def getPerson(var):
    token = var["SECURITY_TOKEN"]
#    return Holder.getNameFromToken().getInstance(token).getPerson()
    return Holder.getiSec().getUserName(token)
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:4,代码来源:cutil.py

示例12: getAppId

def getAppId(var):
    token = var["SECURITY_TOKEN"]
    return Holder.getNameFromToken().getInstance(token)
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:3,代码来源:cutil.py

示例13: __init__

 def __init__(self,var):
     self.var = var
     self.p = Holder.getMailFrom()
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:3,代码来源:cmail.py

示例14: getDictFromFile

def getDictFromFile(dire, dictname) :
  i = Holder.getReadDict()
  seq = i.getDict(dire, dictname)
  return seq
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:4,代码来源:cutil.py

示例15: __init__

 def __init__(self,app) :
   ObjectAdmin.__init__(self,app)  
   self.adminI = Holder.getAdminPerson()
开发者ID:stanislawbartkowski,项目名称:javahotel,代码行数:3,代码来源:sec.py


注:本文中的com.jythonui.server.holder.Holder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。