Q
Problem solve Get help with specific problems with your technologies, process and projects.

Can I edit data in an embedded view in a Domino Web form?

I have an embedded view in a Domino Web form. Is there a way for me to edit the data that I see in that view? How can I make that embedded view editable on a Web form?
Oh, tricky. So it's like the inviewedit event of the Notes client, but you want to do it in a Web app.

Domino server doesn't contain any functionality to do this for you -- it would require a fair bit of custom coding. But it could be done.

The most straightforward way would be by way of a Java applet that reads the view's data via XML (ReadViewEntries URL command) and uses the Java/CORBA interface to modify data on the Domino server. I don't offhand know anyone who's done this, but if you search around the code libraries listed in today's blog, you might find something.

Another option is to use a lot of passthru HTML in the view. There's a view option to do the whole view as passthru, or you can use [square braces] to designate just the column data as passthru and let Domino generate the enclosing tables for you. I'm going to assume Domino server 6 or later -- you could do it with earlier versions, but the formulas would be different. You would have a first view column that generates a form tag: "[<form method=\"post\" action=\"" + @WebDBName + "/someview/" + @Text(@DocumentUniqueID) + "?SaveDocument&FromView\">]"

Then for each field in the view, you have to create the passthru HTML for the field to edit that form. For example, if it were a yes/no field, you might generate the passthru for a <select> tag. Note, of course, that you have to supply the current data as the default value, and that means that you have to convert any characters that don't work in HTML, such as <, > and &, to their corresponding &codes. The @ReplaceSubstring function works nicely for this. Then in the final column, you might have the passthru HTML for a "submit" button, and the </FORM> tag.

On the form, a $$Return field would generate a page containing JavaScript that uses history.back( ) to put the user back in the editing screen. This should let them save a row without losing their data in other rows -- I hope!

Alternately, you could have just one <FORM> tag, your view columns still with the passthru, and just a single Submit button for the whole screen. That would be easier for the user -- but then you can't submit it to a form. You would have to use an OpenAgent URL in the "action" attribute of the <FORM> tag. The agent uses the Request_Content CGI variable to read off all the fields from each row (you could use @DocNumber to give them each different names), including a hidden field that lists the document UNID for that row. Then the agent would locate the documents in question and update their fields, finally using [[double square brackets]] to return a Web page that redisplays the view with the changed data.

All this is just of the top of my head. I haven't tried any of it and would not be surprised if there's some obstacle I haven't thought of.

This was last published in February 2005

Dig Deeper on Web Development for Lotus Notes Domino

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

  • How do I size a UPS unit?

    Your data center UPS sizing needs are dependent on a variety of factors. Develop configurations and determine the estimated UPS ...

  • How to enhance FTP server security

    If you still use FTP servers in your organization, use IP address whitelists, login restrictions and data encryption -- and just ...

  • 3 ways to approach cloud bursting

    With different cloud bursting techniques and tools from Amazon, Zerto, VMware and Oracle, admins can bolster cloud connections ...

SearchContentManagement

Close