I must admit that I have no experience or knowledge of web programming for Domino. I have a problem that is probably laughably simple to solve for most everyone else here. I am running an agent from a form’s webqueryopen event and I cannot figure out how to get a handle on the current document so that I can grab a few values, do some computations, and fill in a couple of fields on it. I cannot figure out how to do this since there is no UIWorkspace to get the current document from. Can anyone point me in the right direction?
Subject: We have a specialized course on using LotusScript in Domino web apps
See TLCC Course Details - Using LotusScript in Domino 6 Web Applications
If anyone is interested in this course let me know and I can arrange a special forum discount!
Subject: *While I haven’t done this specific course, I can heartily recommend the TLCC courses in general
Subject: Web programming question
There is no “front end” on the web, so no NotesUIWorkspace or NotesUIDocument to work with. Instead, you use the
Set doc = NotesSession.DocumentContext
and then use backend methods with the NotesDocument class instead.
Subject: RE: Web programming question
Thanks Ben.
Subject: Web programming question
Dave,
What are you doing that requires the use of a webqueryopen agent, and what exactly does this agent do? I ask this because depending on server load, this can be an awfully expensive transaction that could end up frustrating users. There might be an easier way to “skin the cat”.
Subject: RE: Web programming question
I am trying to build up navigation information for a form. Specifically I am trying to evaluate the following information
-
URL for the document’s parent
-
URL for the “next” and “previous” sibling documents
-
URL for the correct page in a multi-paged view where the entry for the parent document can be found.
I cringe to use an agent for doing this but I cannot think of any other way to do it. When I get the document context it only contains a single field that contains the parameter section of the current URL. If anyone has any suggestions I am all ears.
Subject: RE: Web programming question
Store the values in hidden fields that are computed and use JavaScript for the Navigation.
Subject: RE: Web programming question
Whether the navigation controls are client-based via JS or generated on the server and implemented as links, I still have to perform non-trivial processing in order to calculate some values that are embedded in those links. The most obvious example of this is a link back to a specific page in a muti-page view. I cannot think of formula language logic that would give me the ordinal position of a specific document in a view so that I can calculate a “start=” value from it. @DocNumber does not work on the web. Even more difficult would be finding out the UNIDs of the sibling documents right before and after that document even if you can find it. There may very well be some formula language gurus out there that could actually come up with something that works, but God help anyone else that has to come along later and maintain it.
I have got it all working pretty well using an agent that fires from the webqueryopen event of my form, but l realize that this operation is very expensive and would like to find another way. The web site that this will be used on is normally fairly quiet and can handle the overhead of setting up and running an agent MOST of the time. Other times, like when our website makes the evening news ( the power of television really is amazing ), we get 10+ million hits over the next 24 hours and the server would bog right down.