在视图中作了一个按钮,请高手看一下按钮代码问题?

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

在视图"已处理文档"中作了一个按钮“搜索已经处理的文档”,实现功能为:点该按钮时,会弹出  
  输入查询日期对话框,对话框有两个域m_year和m_month,有确定和取消按钮,用户输入要查询文档的年月,点确定,就在视图"已处理文档"中搜索出符合条件的文档,但是程序写了一部分出现了问题:输入查询年月,点确定后,用户输入的年月无法获取,调试时,显示了变量没有数值,不知道那位高手指点一下!谢谢!  
   
  dim   uiws   as   new   notesuiworkspace  
  dim   se   as   new   notessession  
  dim   nview   as   notesview  
  dim   nyear   as   string  
  dim   nmonth   as   string  
  dim   mainldb   as   notesdatabase  
   
  set   maildb=se.currentdatabase  
  dim   nview=   maildb.getview("已处理文档")  
   
  if   uiws.dialogbox("cx",true,true,false,false,false,false,"输入查询日  
   
  期")   then  
      nyear=m_year  
      nmonth=m_month  
   
  else  
   
  end   if  
   
 

· 网友精彩回答:

发表者:ysou41

这样肯定取不到值的,需要从后端产生一份文挡再取文档的值  
  dim   uiws   as   new   notesuiworkspace  
  dim   se   as   new   notessession  
  dim   nview   as   notesview  
  dim   nyear   as   string  
  dim   nmonth   as   string  
  dim   mainldb   as   notesdatabase  
  dim   doc   as   notesdocument  
   
  set   maildb=se.currentdatabase  
  set   nview=   maildb.getview("已处理文档")  
  set   doc=maildb.createdocument  
   
   
  if   uiws.dialogbox("cx",true,true,false,false,false,false,"输入查询日  
   
  期",doc)   then  
      nyear=cstr(doc.m_year(0))  
      nmonth=cstr(doc.m_month(0))  
   
  else  
   
  end   if  
   
  其中dialogbox的参数不知道写对没,你查一下帮助,需要传一个文挡对象  
 

发表者:chenjj2002

num   =nview.ftsearch(string,0)                     这里的string是不是应该searchstring?  
  if   num=o   then  
  messagebox   "没有找到你要的文档"  
  exit   sub  
  set   doc2=nview.getfirstdocument  
  for   i   =1   to   num  
  call     doc2.putinfolder("搜索")  
  set   doc2=nview.getnextdocument(doc2)  
  end   for  
  call   uiws.openframeset"查询"  
  call   nview.clear  
  end   sub  
   
  且searchstring   ="form=""done"""+"&recieveddate=v",好象有问题,调试的时候看一下searchstring值是多少  
 

.
处理 SSI 文件时出错
© 2006-2008 All Rights Reserved