def getAttributes(sessid): selectedNo = ewd.getRequestValue('menuItemNo',sessid) if selectedNo != "": itemName = ewd.getSelectediWDMenuValue("itemList",sessid) ewd.setSessionValue("itemName",itemName,sessid) else: itemName = ewd.getSessionValue("itemName",sessid) domainName=ewd.getSessionValue("domainName",sessid) username=ewd.getSessionValue("username",sessid) password=ewd.getSessionValue("password",sessid) mdb = ewd.mdb_connect(username,password,'127.0.0.1') query="select * from " + domainName + " where itemName() = '" + itemName + "'" items=mdb.select(domainName,query) dic = items[0] ewd.deleteFromSession("iwdTemp",sessid) ewd.deleteFromSession("attributeValues",sessid) ewd.mergeDictionaryToSession(dic,"iwdTemp",sessid) result = ewd.m_python.m_proc(0, "createAttrList^MDBMgr","attributeValues","iwdTemp",sessid) ewd.deleteFromSession("iwdTemp",sessid) return ""
def getDomainList(sessid): username=ewd.getSessionValue("username",sessid) password=ewd.getSessionValue("password",sessid) mdb = ewd.mdb_connect(username,password,'127.0.0.1') domains = mdb.get_all_domains() domainList = {} no = 0 for domain in domains: no = no + 1 item = {} nvp = {'Name':domain.name.encode('ascii','xmlcharrefreplace')} item.update(nvp) nvp = {no:item} domainList.update(nvp) ewd.mergeDictionaryToSession(domainList,"yuiTemp",sessid) ewd.deleteFromSession("domainList",sessid) if domainList != {}: result = ewd.m_python.m_proc(0, "createiWDMenuFromDictionary^%zewdPython","Name","domainList",sessid) ewd.deleteFromSession("yuiTemp",sessid) return ""
def getAttributes(sessid): selectedNo = ewd.getRequestValue('menuItemNo', sessid) if selectedNo != "": itemName = ewd.getSelectediWDMenuValue("itemList", sessid) ewd.setSessionValue("itemName", itemName, sessid) else: itemName = ewd.getSessionValue("itemName", sessid) domainName = ewd.getSessionValue("domainName", sessid) username = ewd.getSessionValue("username", sessid) password = ewd.getSessionValue("password", sessid) mdb = ewd.mdb_connect(username, password, '127.0.0.1') query = "select * from " + domainName + " where itemName() = '" + itemName + "'" items = mdb.select(domainName, query) dic = items[0] ewd.deleteFromSession("iwdTemp", sessid) ewd.deleteFromSession("attributeValues", sessid) ewd.mergeDictionaryToSession(dic, "iwdTemp", sessid) result = ewd.m_python.m_proc(0, "createAttrList^MDBMgr", "attributeValues", "iwdTemp", sessid) ewd.deleteFromSession("iwdTemp", sessid) return ""
def getDomainList(sessid): username = ewd.getSessionValue("username", sessid) password = ewd.getSessionValue("password", sessid) mdb = ewd.mdb_connect(username, password, '127.0.0.1') domains = mdb.get_all_domains() domainList = {} no = 0 for domain in domains: no = no + 1 item = {} nvp = {'Name': domain.name.encode('ascii', 'xmlcharrefreplace')} item.update(nvp) nvp = {no: item} domainList.update(nvp) ewd.mergeDictionaryToSession(domainList, "yuiTemp", sessid) ewd.deleteFromSession("domainList", sessid) if domainList != {}: result = ewd.m_python.m_proc( 0, "createiWDMenuFromDictionary^%zewdPython", "Name", "domainList", sessid) ewd.deleteFromSession("yuiTemp", sessid) return ""