Download "user manual"

Transcript
Call agentLog.OpenAgentLog
Call agentLog.LogAction("Begin UpdateOutlineEntryWeb")
Set db = session.CurrentDatabase
Set doc = Session.DocumentContext
Call agentLog.LogAction("Before read parameters")
'Get the parameters data
FunctionalPage = doc.FunctionalPage(0)
Call agentLog.LogAction(Cstr(FunctionalPage))
Options = doc.Options(0)
Call agentLog.LogAction(Cstr(Options))
TitleChoose = doc.TitleChoose(0)
Call agentLog.LogAction(Cstr(TitleChoose))
URLChoose = doc.URLChoose(0)
Call agentLog.LogAction(Cstr(URLChoose))
FuncPage = doc.FuncPage
OutlineMenu = doc.OutlineMenu
Call agentLog.LogAction("After read parameters")
'Get the corresponding Outline Menu
NumElements = Ubound(FuncPage)
Call agentLog.LogAction("Elements:= " + Cstr(NumElements))
For i = 0 To NumElements
Call agentLog.LogAction("into the loop")
If ( Cstr(FunctionalPage) = Cstr(FuncPage(i)) )Then
Menu = OutlineMenu(i)
Set outline = db.GetOutline(Cstr(Menu))
Call agentLog.LogAction("Outline: " + Cstr(Menu))
Exit For
End If
Next
'Get the required entry
Set entry = outline.GetFirst()
If Not(entry Is Nothing) Then
Do
Call agentLog.LogAction("Compare: " + Cstr(entry.Label) + " / " +
Cstr(Options) )
If ( Cstr(entry.Label) = Cstr(Options) ) Then
'Set the label
If ( Cstr(TitleChoose) <> "") Then
entry.Label = Cstr(TitleChoose)
Call agentLog.LogAction("Entry label changed")
Else
Call agentLog.LogAction("Entry label not changed")
End If
'Set the new URL
If (Cstr(URLChoose) <> "") Then
Call agentLog.LogAction("To modify the URL")
If ( entry.SetURL(Cstr(URLChoose))) Then
Call agentLog.LogAction("URL modified")
Else
Call agentLog.LogAction("URL not assigned")
End If
252
Build a Portal with Domino: A S/390 Example