dominoGuru.com
Your Development & Design Resource
Creating Form Design Element Sidebar Widgets
07/11/2008 11:27 AM by Chris Toohey
Here's a 52 second Jing videocast showing how you can add a Lotus Notes Form as a Sidebar Widget. Once you check that out... you may be interested in what went into the design of said Form Design Element.
I'll use SOTU v0.2 as my example here, so if you haven't already, go download it so you can play along at home...
So first, I created a pretty simple Form Design Element named "sidebar_remotecommand":
Pretty simple stuff. SaveOptions prevents the Form from being saved back to the database, and my Process button looks like this:
Sub Click(Source As Button)
Dim s As New NotesSession
Dim w As New NotesUIWorkspace
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument
Dim vw As NotesView
Dim scol As NotesDocumentCollection
Dim sdoc As NotesDocument
Set db = s.CurrentDatabase
Set uidoc = w.CurrentDocument
Set doc = uidoc.Document
Set vw = db.GetView("servers")
Forall server In doc.GetItemValue("servername")
Set scol = vw.GetAllDocumentsByKey(server, True)
Set sdoc = scol.GetFirstDocument
Call genResponse(sdoc, Cstr(server), doc.GetItemValue("command")(0))
End Forall
Call uidoc.FieldSetText("servername", "")
Call uidoc.FieldSetText("command", "")
Call uidoc.Refresh
End Sub
provided by Julian Robichaux at nsftools.com.
... yeah, that's about it. I blank out the fields and refresh the UI so that the "reports" from the processed remote console requests are displayed directly in the widget.
This is an EXTREMELY powerful combination of current subject expertise and this new entry-point into our applications - I'm now running around like a madman creating RAD widgets for all of our applications without the need to ramp-up on Java Sidebar Application development.