Отправляет email-рассылки с помощью сервиса Sendsay

Бюллетень "Lotus Notes CodeStore"

  Все выпуски  

Useful agents for IBM Lotus Notes and Domino administrators


Рассылку ведет: Программист на Lotus NotesLotus CoderВыпуск No 246 от 2009-10-19
рассылка о программировании на Lotus Notes/Domino
Обсуждения на форумах, блогах. Примеры программного кода на LotusScript,@formula, Java

рассылка:выпускархивлентаблогсайт

Бюллетень "Lotus Notes CodeStore" Выпуск 13 от 21.04.2008

comp.soft.prog.lotuscodesrore

CodeStore. Примеры кодов

%REM
Copyright 2009 TietoEnator Alise (developed by Arturs Mekss) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. %END REM Type NodeQuery
nodeName As String
subNodeName As String
subNodeValue As String
nth As Integer
End Type %REM
Version: 0.8.0
Author: AMe
Purpose: This class provides methods for XML structured data processing in LotusScript. XML structure could be read from files or String variables and/or could be written to files or printed out as Text. There are methodes which can be used in order to modify existing XML structure or XML structure
could be built from scarch
Methods: - isReady() As Boolean - parseString(sourceStr As String) As Boolean
- parseFile(sourceFilePath As String) As Boolean - toStream() As NotesStream
- toText() As Boolean
- toFile(targetFilePath As String) - appendElementNode(pNode As NotesDOMElementNode, nodeName As String, nodeValue As String, altNodeValue As String) As NotesDOMElementNode
- selectNode(elementNode As NotesDOMElementNode, query As String) As NotesDOMElementNode
- getNodeValue(elementNode As NotesDOMElementNode, altVal As String) As String
Examples: '1. Build XML from scrach and store to file
Dim xml As XMLProcessor
Dim personNode As NotesDOMElementNode
Set xml = New XMLProcessor("persons")
Set personNode = xml.appendElementNode(Nothing, "person", "", "") 'if parent node is Nothing then root node will be used as parent node
Call xml.appendElementNode(personNode, "name", "Bart", "")
Call xml.appendElementNode(personNode, "sureName", "Simpson", "")
Set personNode = xml.appendElementNode(Nothing, "person", "", "")
Call xml.appendElementNode(personNode, "name", "Jonny", "")
Call xml.appendElementNode(personNode, "sureName", "Bravo", "")
Call xml.toFile("D:\WORK_TMP\xml\persons.xml") '2. Read XML from file and print it as a plain text
Dim xml As XMLProcessor
Set xml = New XMLProcessor("")
Call xml.parseFile("D:\WORK_TMP\xml\persons.xml")
Call xml.toText() '3. Read XML from file and get values via selector
Dim xml As XMLProcessor
Dim node As NotesDOMElementNode
Set xml = New XMLProcessor("")
Call xml.parseFile("D:\WORK_TMP\xml\persons.xml")
Set node = xml.selectNode(Nothing, "person:2>name")
MessageBox xml.getNodeValue(node, "-")
Set node = xml.selectNode(Nothing, "person(name=Bart)>sureName")
MessageBox xml.getNodeValue(node, "-") %END REM
Class XMLProcessor 'General variables
Private session As NotesSession
Private objIsReady As Boolean 'Object is properly initialized 'XSLT variables
Private isXSLTDefined As Boolean
Private XSLT As NotesStream 'InputStream variables
Private InputStream As NotesStream 'OutputStream variables
Private outputStream As NotesStream 'DOM variables
Private domparser As NotesDOMParser
Private domdoc As NotesDOMDocumentNode
Private rootNode As NotesDOMElementNode 'PUBLIC Scope: Public Sub new(rootNodeName As String)
On Error Goto errh
Dim piNode As NotesDOMProcessingInstructionNode
Set Me.session = New NotesSession If rootNodeName <> "" Then
Set domParser=session.CreateDOMParser
Set domdoc = domparser.Document
Set piNode = domdoc.CreateProcessingInstructionNode(|xml|, |version="1.0" encoding="UTF-8"|)
Call domdoc.appendChild(piNode)
Set rootNode = domdoc.CreateElementNode(rootNodeName)
Call domdoc.appendChild(rootNode)
Me.objIsReady = True
End If Exit Sub
errh: Call Me.onError()
Exit Sub
End Sub Public Sub Delete
On Error Goto errh ' -- Closing opened resources
' closing xslt stream
If Me.isXSLTDefined Then Call Me.XSLT.Close()
'closing output stream
If Not Me.outputStream Is Nothing Then Call Me.outputStream.Close
'closing input stream
If Not Me.inputStream Is Nothing Then Call Me.inputStream.Close Exit Sub
errh: Call Me.onError()
Exit Sub
End Sub Public Function isReady() As Boolean
isReady = Me.objIsReady
End Function Public Function parseString(sourceStr As String) As Boolean
On Error Goto errh If Me.createDOMParserFromSource(sourceStr) Then
parseString = True
Me.objIsReady = True
End If Exit Function
errh: Call Me.onError()
Exit Function
End Function Public Function parseFile(sourceFilePath As String) As Boolean
On Error Goto errh Set Me.InputStream = session.CreateStream()
If Me.InputStream.Open(sourceFilePath, "UTF-8") Then
If Me.InputStream.Bytes = 0 Then Error 3000, "File does not exist or is empty: " + sourceFilePath
If Me.createDOMParserFromSource(Me.InputStream) Then
parseFile = True
Me.objIsReady = True
End If
E
%REM
Copyright 2009 TietoEnator Alise (developed by Arturs Mekss) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. %END REM Type NodeQuery
nodeName As String
subNodeName As String
subNodeValue As String
nth As Integer
End Type %REM
Version: 0.8.0
Author: AMe
Purpose: This class provides methods for XML structured data processing in LotusScript. XML structure could be read from files or String variables and/or could be written to files or printed out as Text. There are methodes which can be used in order to modify existing XML structure or XML structure
could be built from scarch
Methods: - isReady() As Boolean - parseString(sourceStr As String) As Boolean
- parseFile(sourceFilePath As String) As Boolean - toStream() As NotesStream
- toText() As Boolean
- toFile(targetFilePath As String) - appendElementNode(pNode As NotesDOMElementNode, nodeName As String, nodeValue As String, altNodeValue As String) As NotesDOMElementNode
- selectNode(elementNode As NotesDOMElementNode, query As String) As NotesDOMElementNode
- getNodeValue(elementNode As NotesDOMElementNode, altVal As String) As String
Examples: '1. Build XML from scrach and store to file
Dim xml As XMLProcessor
Dim personNode As NotesDOMElementNode
Set xml = New XMLProcessor("persons")
Set personNode = xml.appendElementNode(Nothing, "person", "", "") 'if parent node is Nothing then root node will be used as parent node
Call xml.appendElementNode(personNode, "name", "Bart", "")
Call xml.appendElementNode(personNode, "sureName", "Simpson", "")
Set personNode = xml.appendElementNode(Nothing, "person", "", "")
Call xml.appendElementNode(personNode, "name", "Jonny", "")
Call xml.appendElementNode(personNode, "sureName", "Bravo", "")
Call xml.toFile("D:\WORK_TMP\xml\persons.xml") '2. Read XML from file and print it as a plain text
Dim xml As XMLProcessor
Set xml = New XMLProcessor("")
Call xml.parseFile("D:\WORK_TMP\xml\persons.xml")
Call xml.toText() '3. Read XML from file and get values via selector
Dim xml As XMLProcessor
Dim node As NotesDOMElementNode
Set xml = New XMLProcessor("")
Call xml.parseFile("D:\WORK_TMP\xml\persons.xml")
Set node = xml.selectNode(Nothing, "person:2>name")
MessageBox xml.getNodeValue(node, "-")
Set node = xml.selectNode(Nothing, "person(name=Bart)>sureName")
MessageBox xml.getNodeValue(node, "-") %END REM
Class XMLProcessor 'General variables
Private session As NotesSession
Private objIsReady As Boolean 'Object is properly initialized 'XSLT variables
Private isXSLTDefined As Boolean
Private XSLT As NotesStream 'InputStream variables
Private InputStream As NotesStream 'OutputStream variables
Private outputStream As NotesStream 'DOM variables
Private domparser As NotesDOMParser
Private domdoc As NotesDOMDocumentNode
Private rootNode As NotesDOMElementNode 'PUBLIC Scope: Public Sub new(rootNodeName As String)
On Error Goto errh
Dim piNode As NotesDOMProcessingInstructionNode
Set Me.session = New NotesSession If rootNodeName <> "" Then
Set domParser=session.CreateDOMParser
Set domdoc = domparser.Document
Set piNode = domdoc.CreateProcessingInstructionNode(|xml|, |version="1.0" encoding="UTF-8"|)
Call domdoc.appendChild(piNode)
Set rootNode = domdoc.CreateElementNode(rootNodeName)
Call domdoc.appendChild(rootNode)
Me.objIsReady = True
End If Exit Sub
errh: Call Me.onError()
Exit Sub
End Sub Public Sub Delete
On Error Goto errh ' -- Closing opened resources
' closing xslt stream
If Me.isXSLTDefined Then Call Me.XSLT.Close()
'closing output stream
If Not Me.outputStream Is Nothing Then Call Me.outputStream.Close
'closing input stream
If Not Me.inputStream Is Nothing Then Call Me.inputStream.Close Exit Sub
errh: Call Me.onError()
Exit Sub
End Sub Public Function isReady() As Boolean
isReady = Me.objIsReady
End Function Public Function parseString(sourceStr As String) As Boolean
On Error Goto errh If Me.createDOMParserFromSource(sourceStr) Then
parseString = True
Me.objIsReady = True
End If Exit Function
errh: Call Me.onError()
Exit Function
End Function Public Function parseFile(sourceFilePath As String) As Boolean
On Error Goto errh Set Me.InputStream = session.CreateStream()
If Me.InputStream.Open(sourceFilePath, "UTF-8") Then
If Me.InputStream.Bytes = 0 Then Error 3000, "File does not exist or is empty: " + sourceFilePath
If Me.createDOMParserFromSource(Me.InputStream) Then
parseFile = True
Me.objIsReady = True
End If
E
This class provides methods for XML structured data processing in Lotus Script. XML structure could be read from files or String variables and/or could be written to files or printed out as Text. There are methods which can be used to modify existing XML structure or XML structure could be built from scratch. Currently I'm working on XML transformation with XSLT feature and want to extend the power of DomQuery selector
Еще примеры:
Больше кодов на сайтах:

Форумы.Свежи темы и обсуждения

Интересные темы:
Список форумов:

Tips. Советы

Vince Schuurman's customer had a question on the size of a particular database. It only had a few documents but was over 250MB. The answer is certainly interesting.

Read | Permalink


EASY DOMINO ACCESS: REMOVE PASSWORDS, END LOGIN PROMPTS, REDUCE PASSWORD MANAGEMENT
PistolStar's Password Power provides browser-based single sign-on to Lotus Domino, Sametime and Quickr with the enhanced security of the Kerberos or NTLM authentication protocol.

  • Full support available for NTLM authentication protocol in non-Active Directory environments
  • Seamlessly integrate Microsoft Active Directory and the Kerberos authentication protocol
  • Leverage Active Directory password policies to unify Lotus applications


Download white paper to learn more: "Leverage Active Directory with Kerberos to Eliminate HTTP Password"

Technote 1406281, just published, relates to performance issues, not hangs, in Domino 8.5.x. There is a hotfix, if you need it. Otherwise, the fix should be included in Domino 8.5.2.

Read | Permalink
Keith Brooks has provided a 3.5-minute video on upgrading a Domino Server. The actual process takes a little under 3-minutes. Honest. He promises.

Read | Permalink
Andy Donaldson has written up instructions on using InstallShield Tuner for Lotus Notes with Notes 8.5.1. He's providing it as a downloadable PDF.

Read | Permalink


NEW! LEARN NOTES AND DOMINO 8 AT YOUR PLACE AND PACE!
Try a free course at www.tlcc.com/dompower8

My love for this site wanes from time to time. Right now it's on the up. The dead horse I felt I've been flogging has been given a new lease of life and is limping back to a canter.

I know I keep banging on about the changes I've been making. Sorry. Once they're out of the way there's plenty of content to come. I just want to get the site in shape while I chance to. I need to feel the love in order for the content to flow.

This morning I made an improvement to the threaded comments that was requested a couple of times. Now, by default, any reply more than two levels deep is hidden. There is a "button" to toggle the display of the next level of the conversation, as below:

image

To see it in action take a look at the comments from the other day.

To Come

Before I'm completely happy with the new site-wide commenting feature I want to add the following improvements:

  1. A fool-proof way convert links in to, errr, links. Hopefully withough having to use a Java WQS agent (is it me or do they make submitting a form sloooow?).
  2. Basic HTML formatting. You know, the BB-style thing or maybe like stackoverflow's. Perhaps a little ambitious though.
  3. Option to switch from threaded conversations (the default) to a simple chronological list (and store preference in a cookie).
  4. Maybe make the comments section of the page as wide as the #container div, rather than the width of the main column, so it has a little more space.
  5. Improved spam handling. At the moment any reply to a blog more than X days old has to have me approve it. I want to improve on this.

Watch this space.

Click here to post a response

The first item on my list of proposed improvements to this site last week was:

Now we know who's replying to what, it's possible to add the option to be notified via email of any reply to your reply. No need to keep checking back for an answer!

The idea being you can get alerted when people reply to you reply/query, without needing to remember to check back. Much more likely you'll get your answer that way.

Further to this I wanted to add another bonus feature, which I've seen done on other systems and always wanted to replicate in Domino. If not just to prove you can then because it's good to have.

The feature would allow you to reply - via email - directly to the blog. What I mean is - you would get an email saying "New reply to your post on codestore", which contains the text of the new reply and then, if you want to add a reply to it, you just hit reply and send an email to the magic reply-to address. The text is taken from your email and posted as a new comment. If the person you're replying to also wanted an email alert they'll get one and the conversation can continue like so.

Putting Theory in to Practice

Like most ideas I have I get excited about them and want to get on proving it can be done. I fell at the first hurdle though. It seems obvious to use a "When new mail arrives" agent, no? Well, I just can't get them to work.

What I've done so far is make this database (store.nsf) a Mail-in Database with its own email address. I then setup a simple "New mail" agent that adds a "Processed" field to the documents and saves them. I've sent the database some emails, which do arrive, but the agents just won't run.

It might be worth mentioning at this point that, in my ten years with Notes, I've never used this type of Agent before!

After a frustrating hour or two I Googled "new mail agents don't work" or something like that and finally found this technote, which says:

The signer of the agent (the last person to save or enable the agent) must have their mail file located on the same server as where the agent will run. The server determines this by taking the name of the last person to save the agent, performing a person lookup into the Domino Directory and retrieving the Mail Server from that user's Person document.

Why, why, why....!?

I'm not even sure that's the answer though. Although it could be, as the ID I signed it with is included in the FullName field of a Person document that does have a mail file on the same server, but the ID is from a different domain.

What I'm wondering is whether I should ditch this Agent trigger and just have it run every few minutes instead? Are new mail agents notoriously troublesome?

Click here to post a response

Еще советы:
Смотри советы на сайтах:

Блоги. Что обсуждают и пишут

Author: Rob Goudvis
Tags: forms layout alignment
Idea:
I would like to see that it would be easier to control the alignment of elements on a form. There are alreay a number of techniques, but many of them are so superficial and sometimes very hard to modify later.
 
A sample: I have a table cell with an editable text control followed by a text, in my case an indication of the units of that text, and I cannot get it lined out on the same horizontal line.

Author: Darren Duke
Tags: copy paste usability
Idea:
If I have HTML email and wish to copy some of the text into a another Notes document that contains a text field (not a RT field), then the text should copy over.
 
Instead, I get an error "Only text can be pasted into this type of field". I have to paste the clipboard into Notepad then into Notes.
 
I should not have to make the field rich text to get around this. Notepad works!
 
See the official IBM response here:
 
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp?topic=/com.ibm.notes85.help.doc/err_only_text_can_be_pasted_r.html

Author: Jurjen van den Broeck
Tags: Lotus Notes SwiftFile
Idea:
Add the SwiftFile function (default) to the Lotus Notes client (install).

Author: Rob Goudvis
Tags: development
Idea:
This forum holds a great many number of excellent Idea's, but I cannot imagine that they are exclusively wanted by us for the latest version of Notes.
 
I do understand that resources at IBM are limited, but there are so many developers out there that will not use the lateste Notes version. This is because they are working for customers that are happy with their current version. It is not realistic to expect that they will migrate to the latest version.
 
This brings up a question: how far should you go back? Notes 5? Notes 4? Notes 3?
 
What do you think?

As part of the discussion template next generation project I've created another prototype. This prototype is not a core feature of the template but rather a global add on to Lotus Notes. The add on allows easy publications of any Notes documents to ...
Author: Theo Heselmans
Tags: notes protocol parameters query_string agent
Idea:
I'm using "Notes://...?open&Code=123" as a url from a browser.
This works perfectly.
However, I need to be able to read the query_string provided in the url.
Trying this with e.g. an ?Openform, resulted in an empty string.
 
I also tried opening an agent using Notes://...myagent?Open,
but this didn't work at all !

Author: Theo Heselmans
Tags: notes protocol parameters query_string agent
Idea:
I'm using "Notes://...?open&Code=123" as a url from a browser. This works perfectly. However, I need to be able to read the query_string provided in the url. Trying this with e.g. an ?Openform, resulted in an empty string.
 
I also tried opening an agent using Notes://...myagent?Open, but this didn't work at all !

Author: Hynek Kobelka
Tags: attachments
Idea:
Just a small idea how to improve the performance of opening documents in the Notes-client.
Right now if you open a document which contains attachments, then they are always completly loaded from the server and only after this the document is displayed.  It would be better if attachments were loaded only when the user actually opens them. (and  only the specific attachment) Or they could be loaded in a separate background process which would not delay the opening the document.
 
- it would save network bandwith
- it would save time opening docs (and specifically mails)

Author: Hynek Kobelka
Tags: attachments
Idea:
Just a small idea how to improve the performance of opening documents in the Notes-client.
Right now if you open a document which contains attachments, then they are always completly loaded from the server and only after this the document is displayed.  It would be better if attachments were loaded only when the user actually opens them. (and  only the specific attachment) Or they could be loaded in a separate background process which would not delay the opening the document.
 
- it would save network bandwith
- it would save time opening docs (and specifically mails)
 
------------------------------------------------------
Added on 18.10.2009:
I have now tested it again and counted network traffic and loading times and the described handling is NOT the case. Attachments are loaded correctly only when needed.
Sorry for this post, i had come to this conclusion based on an aplication where the form was responsible for the loading times when large atachments were presend and made a too fast wrong assumption :-(
 
Thanks Theo for correcting me.
 
"Idea" withdrawn.  Pease ignore it.

Author: Tony Austin
Tags: Lotus Notes Image retrieval Image manipulation
Idea:
For SDMS Version 4.5 -- see http://notestracker.blogspot.com/2009/10/sdms-version-4500-for-lotus-notesdomino.html -- one new feature added was the ability to "brand" each SDMS replica with your own logo image by specifying it in the SDMS Profile document, in order to have your logo displayed at top left of each page (rather than the standard, fixed SDMS icon).
 
It was easy to get working for the Notes Client environment, but I ran into a few coding issues when trying to get it working for the Web environment, sent out a cry for ideas (see http://notestoneunturned.blogspot.com/2009/04/image-served-out-by-domino-not-visible.html ) and thankfully got tips on how to handle graphics in the Web environment.
 
Thinking back over all this, I've come to the conclusion that we need the ability to programmatically manipulate image resources directly, and I'm suggesting two new Formula Language @functions for this.
 
Let's call them "@SetImageResource" and them " @GetImageResource" shall we?
 
I propose that the first would let you retrieve an image resource directly from the database's internal image resource repository, and the second would enable you to directly write an image into the repository. The @GetImageResource should enable you to retrieve at least a specific image resource (e.g., a file such as "logo.gif"). It would be nicer if you could also retrieve a list of image resources (perhaps with their filenames filtered by wild-card string, such as *.png) so that you can enumerate the list and do some clever things.
 
Then you wouldn't have to mess around with hidden views and other trickery to easily and elegantly manipulate images in your applications.

Author: Michael Falstrup
Tags: client 8.5.1 exit
Idea:
...and not have tasks running in the background like notes2.exe, which often result in unsuccessfull client restarts og db fixup if computer is restarted before tasks has closed down grazefully.
 
An idea is to have a prompt with a process bar/circle indicating the Notes Client is closing, like:
 
Notes Client shutting down, please wait .......
 
And this should not go away before all related programs/tasks has shut down grazefully, even if Notes Client Window closes.
 
You could even extend the nsd service to keep tags on these tasks/programs and make sure that the computer doesn't restart before these have stopped successfully and make sure you can't restart the Notes Client before either.

Еще записи:
Интересные блоги специалистов:

Статьи и Документация

Useful agents for IBM Lotus Notes and Domino administrators Sudhakar Kunam Staff Software Engineer IBM Software Group Pune, India September 2009 Summary: This article is a collection
This interview with Chris Toohey is the first in a series of interviews with IBM Lotus Domino Designer developers who are active contributors to the Lotus community.
The IBM Lotus Web Content Management (hereafter called “Web Content Management”) API provides an extension of standard features of Web Content Management. This article provides usage and solutions with code samples of the most common implementations carried out by customers using APIs. You can pick and choose the samples provided here, as is, to incorporate into your system.
In this article, we give an overview of IBM® LotusLive Meetings and describe its unique features. In other articles in this series, we examine each offering in more detail.
In this article, we give an overview of the IBM® LotusLive offerings and describe their unique features. In subsequent articles in this series, we examine each offering in more detail.
In this article, we give an overview of IBM® LotusLive Engage and describe its unique features. In other articles in this series, we examine each offering in more detail.
There have been several customization improvements in 8.5.1. The major difference is that all customization forms and subforms have been moved to a separate file called the Extension Forms File. If
This document describes a Lotus Domino 8.5 Server crash hosting iNotes user with SMIME support enabled.
In a Notes multi-user install on Citrix, installed using custom data directory specification, Notes uninstall may not remove all needed registry settings.
Notes 8.5.1 introduces the ability to install Notes multi-user on Windows or Citrix with a custom data directory specification. In instances where the installed Notes client is run against a Windows 2008 server, an Internet Explorer Enhanced Security Configuration (IE ESC) error message dialog may appear against about:security_notes2.exe when starting Notes.
There are changes to the Notes silent Modify operation command line syntax for removing or adding Notes install kit features within a release.
There are accessibility issues with widgets configuration wizards. JAWS incorrectly announces the Show button as Type to find. Other user interface elements are not correctly announced.
Error: "Lotus Notes/Domino or a Notes/Domino related process is still running. Please close it before pressing OK to continue." when installing hot fix or fix pack on Microsoft Windows Server 2008.
As of Friday, 16 October 2009, the country of Argentina has cancelled their Daylight Savings Time Observance. IBM/Lotus is currently working on a resolution for the Argentina customers affected by this decision. We will provide an update in this document when we have a viable solution for our customers.
The Notes 8.5.1 Preview Guide is a colorful PDF, showing you what's new in Notes 8.5.1 and what's changed since the last release. This preview guide also includes links to additional learning material
IBM Lotus has prepared a set of LotusScript agents that will update any existing Lotus Notes calendar entries, resource reservations, and resource documents to conform to the repeal of DST rules for Argentina. These agents provide an IT organization flexibility on how to roll out the updates. They work on calendar entries created by Notes 6.x and later, with optional support for calendar entries created by 5.x clients. These agents are designed to run in a Notes 6.x and above client..
Также почитатай:
Найти документацию можно на сайтах:

В избранное