我有一個應用程序,在Lotus表單的Postopen中有一些編碼,現在我需要使用XPage將此客戶機應用程序更改爲web。蓮花窗體的Postopen編碼更改爲X頁面
我如何在XPage中編寫代碼來實現表單的Postopen函數?感謝幫助!
以下是形式的PostOpen的編碼:
Sub Postopen(Source As Notesuidocument)
.........
Set Targetdb = New NotesDatabase(db.Server, "OAS\PERSONAL.NSF")
Set enameview = Targetdb .GetView("ENAMEVIEW")
If enameview Is Nothing Then
Print "Coludn't find ENAMEVIEW View."
Exit Sub
End If
Set cnameview = Targetdb .GetView("CNAMEVIEW")
If cnameview Is Nothing Then
Print "Couldn't find CNAMEVIEW View."
Exit Sub
End If
Set Personaldoc = enameview.GetDocumentByKey(userName.ABBREVIATED,True)
If Personaldoc Is Nothing Then
message = "Couldn't find your information in Personal Database。 " & Chr(10)
msgtype = MB_OK + MB_ICONSTOP
return_code = Messagebox (message, msgtype, db.Title)
Exit Sub
End If
Set doc = Source.Document
If doc.IsNewNote Then
doc.dept=Personaldoc.DEP_NO_CNAME(0)
doc.Location = Personaldoc.Location(0)
If Personaldoc.C_SUPERIOR2(0)="" Then
doc.Director= Personaldoc.C_SUPERIOR(0)
Else
doc.Director= Personaldoc.C_SUPERIOR2(0)
End If
End If
末次
請更具體。 –
我想插入編碼到這個評論,但我不知道如何插入。 –
改爲更新問題。 –