Contact Information

Chris Toohey

Like what you see? Help feed-the-beast by donating to the site and its humbly thankful author!

My Twitpic Updates
    Site Resources

    RSS Site Content
    Syndicate This Site!
    DG Banner Logo
    Advertisements
    Creating Form Design Element Sidebar Widgets

    07/11/2008 11:27:38 AM | Chris Toohey | Bethlehem, PA

    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":

    sidebar_remotecommand Form Design Element in Domino Designer

    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
    This LotusScript was converted to HTML using the ls2html routine,
    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.


    Like what you see? Help feed-the-beast by donating to the site and its humbly thankful author!

    Comments

    Clay
    04/30/2009 11:17:08 AM

    Pretty cool!

    Wondering how you got around the issue of when a user presses escape when the focus is on the widget?

    The form will close and then the user will need to re-add the widget.

    Cheers



    Add a New Comment


    (Not Published/Public)
    Remember my Information!

    (Enter the text from the image to proceed)

    (Full markup allowed in the comment field below; play nice!)

    Live Comments Preview