1、新增的一个mainformWeb 表单
http://localhost/demo.nsf/mainformWeb?OpenForm&flag=Fir&viewNow=ShouViewWS
1.1、表单创建的视图所在的iframe
code
- <iframe name=viewss MARGINHEIGHT=0 MARGINWIDTH=0 FRAMEBORDER=0 WIDTH=630 HEIGHT=<计算的值> overflow:auto src="" SCROLLING=NO>
- </iframe>
1.2、使用的javascript代码
- function changeView(viewUrl)
- {
- debugger;
- document.forms[0].viewalias.value=viewUrl;
- viewUrl = viewUrl + "?openview";
- window.open(viewUrl,"viewss");
- }
- function OpenDoc(DocId)
- {
- debugger;
- var pathname = (window.location.pathname);
- thisform = document.forms[0];
- var pathname1=pathname.substring(0,(pathname.lastIndexOf('.nsf')+5));
- var pathname2=pathname1+'0/'+DocId+"?opendocument";
- window.open(pathname1+"OpenUrl?Openform&Url="+pathname2,'_blank', 'toolbar=yes, menubar=yes, scrollbars=yes,resizable=yes,location=yes, status=yes,directories=yes')
- }
-
- function createdocument(FileType,EditMode){
- //使用代理跳转创建新的文件,或者使用openform 创建新的文件
- var pathname = (window.location.pathname);
- pathname =pathname.substring(0,(pathname.lastIndexOf('.nsf')+5))
- FileType=getUnicodeString(FileType);
- UserName=getUnicodeString(document.forms[0].myNotesName.value);
- QS="&UserName="+UserName+"&FileType="+FileType+"&EditMode="+EditMode+TimeNow()
- url=pathname+"newdoc?openAgent"+QS;
- Left1=(window.screen.width-10);
- Top1=(window.screen.height-10);
- window.open(url ,"win",'location=no,resizable=no,status=no,scrollbars=no,width=10,height=10,left='+Left1+',top='+Top1);
- }
1.3、表单使用的隐藏栏位
query_string_decoded显示时计算,数值为:query_string_decoded
biaozhi:@Right(query_string_decoded;"flag=")
1.4、各个视图的链接
添加操作热点或者web文本,用来触发点击事件,切换表单中嵌入的视图。要先写文本,才能点击操作热点。

2、视图界面:新增一个页面的名字$$viewtemplate for 【viewname】 注意viewname需要和视图是一样的。
在页面中嵌入一个视图。
新增三行表格,中间放视图,第一行、最后一行放操作按钮。
- 首页:@Command([OpenView]; @ViewTitle)
- 上一页:@DbCommand("Domino"; "ViewPreviousPage")
- 下一页:@DbCommand("Domino"; "ViewNextPage")
- 尾页:@DbCommand("Domino"; "EndView")
- 折叠:@Command([ViewCollapseAll])
- 新增一个页面的名字$$viewtemplate for 【viewname】

3、视图
视图列点击事件:
- res:=ForValueName;
空格列使用:"...."
交替行颜色设定:


表单附件展示的简易写法
- //附件展示 表单公式
- @If (@Attachments = 0; @Return(""); "");
- ThisDb := @ReplaceSubstring(@Subset(@DbName; -1); "\\":" "; "/":"+");
- @If (@Contains(@AttachmentNames; ".");
- @Left(@AttachmentNames; ".") + "." +
- @Right(@AttachmentNames; ".");
- @AttachmentNames) +
- "\">" + "\"font-family:arial;font-size:7pt;color:blue;text-decoration:underline;\">" + @AttachmentNames + "";
- "
"); - "[" + res + "]"
-
-
- //表单展示事件、作者等。
-
- @Text(@Now)
-
- @Name([Abbreviate];@UserName)