LOTUSSCRIPT/COM/OLE CLASSES


Examples: NotesProperty class
This is the script for a form action. The action properties dialog has been used to associate this action with a "WSDL action" defined in a Composite Properties design element, so that the form action executes when that form is open and the Property Broker triggers the WSDL action. It updates the value of propvalue on the form with the property value of the current Property Broker's NameSpace property.

Sub Click(Source As Button)
Dim s As New NotesSession
Dim workspace As New NotesUIWorkspace
If workspace.IsEmbeddedInsideWCT Then

 Dim pb As NotesPropertyBroker
 Set pb = s.GetPropertyBroker("com.ibm.compositeapps.samples")
 Dim pbInputProperty As NotesProperty
 Dim pbContext As Variant

 'retrieves array of input NotesProperties
 'only first member of array is populated in this release
 pbContext = pb.InputPropertyContext
 Set pbInputProperty = pbContext(0)

 Dim InputPropertyName As String
 Dim NameSpace As String
 InputPropertyName = pbInputProperty.Name
 NameSpace = pbInputProperty.NameSpace

 Dim pbValue As Variant
 pbValue = pb.GetPropertyValue(InputPropertyName,NameSpace)
 cName$ = pbValue(0)

 Dim uidoc As NotesUIDocument
 Set uidoc = workspace.CurrentDocument
 Call uidoc.FieldSetText("propvalue",cName$)
 Call uidoc.Save
Else
 Messagebox "Wrong Configuration", MB_OK, "Basic Configuration"
End If
End Sub