我有一个嵌入式视图,该视图在单击视图中的文档时会打开一个对话框。
关闭对话框时(使用基本@Commands使用保存并关闭或仅使用关闭按钮),而不是仅关闭对话框即可清除屏幕上的基础窗体,并像打开窗体一样打开对话框。 br />
如果我关闭该窗口,将重新出现原始的基础窗体,这是我希望在不出现中间对话框窗体的情况下发生的情况。
这是因为我正在使用对@Command([FileSave]); @Command([FileCloseWindow])
的@Function调用,还是缺少其他内容?
表单上是否有我未设置的标志,或者对话框上的操作是否需要用LotusScript编写,并且它们必须以某种方式重新调用表单?
使用以下公式从视图中打开对话框:
Sub Queryopendocument(Source As Notesuiview, Continue As Variant)
Call OpenDocInDialogBox( Source, True, 1, "frmOrganization", "Organization")
End Sub
和OpenDocInDialogBox函数是:
Function OpenDocInDialogBox( Source As NotesUIView, Continue As Variant, WhatIfNonEmbed As Integer, Form_Name As String, Dlg_Title As string) As Integer
Dim DocColl As NotesDocumentCollection
Dim Doc As NotesDocument
Dim flag As Integer
Dim ws As New NotesUIWorkspace
Dim temp As Variant
Continue = False
flag = False
Set DocColl = Source.Documents
Set Doc = DocColl.GetFirstDocument
doc.IsDialogBox = "Yes"
If Not ws.CurrentDocument Is Nothing Then 'Checks if it is an embedded view
If ws.CurrentDocument.EditMode Then
flag = ws.DialogBox( FORM_NAME, True, True, True , False, False , False , DLG_TITLE, Doc , True, True )
Else
flag = ws.DialogBox( FORM_NAME, True, True, True , False, False , True , DLG_TITLE, Doc , True, True )
End If
Else 'open from an action button
Select Case WhatIfNonEmbed
Case 0
MsgBox "Sorry.. You cannot open documents From the current view.", 0 + 16, "Warning"
Case 1
flag = ws.DialogBox( FORM_NAME, True, True, True, False, False , False, DLG_TITLE, Doc , True, True )
Case 2
doc.IsDialogBox = "No"
Continue = True
End Select
End If
OpenDocInDialogBox = flag
End Function
代码中的标志是指以下
WhatIfNonEmbed tells how to open the document If gets opened From a non-embedded view.
WhatIfNonEmbed=0 ---- Dont Allow users To Open (meaning, doc can be only opened from the form In which it is embedded)
WhatIfNonEmbed=1 ---- Open In Dialog box.
WhatIfNonEmbed=2 ---- Normal Open using the form.
答案 0 :(得分:0)
umeli已经在评论中回答了,但是由于他没有写完整的答案,我将这样做:
QueryOpenDocument事件具有一个“ Continue”-变量,该变量告诉它是应该“真正”打开文档(Continue = True)还是禁止文档(Continue = False)。
对话框被阻止。您的代码目前正在做什么:
两种解决方法:
Call OpenDocInDialogBox( Source, Continue, 1, "frmOrganization", "Organization")