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

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

  Все выпуски  

Is it possible to have different titles for the same archive databases in Notes?


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

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

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

comp.soft.prog.lotuscodesrore

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

Еще примеры:
Больше кодов на сайтах:

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

Собственно на 8.5.1 полной с эклипсом(на любой версии с эклипсом)
при выплевывании данных в ексель на строке
Call Sh.Hyperlinks.Add(sh.Cells(2, 2), "http:\\lotus.net.ua") - формирование линка
валится лотусиный клиент, намертво...
а гиперлинки в екселе очень нужны, что делать кто нибудь сталкивался?
Делал ли кто следующее связку ST и АТС по средствам SIP нужно только звонить с клиента по номерам которые есть в DD. Достаточно ли будет платы VoIP для АТС?
Здравствуйте
...
Добрый день!
В документообороте на лотусе, создаю поручения. Всего имеется 31 поручение. При создании 32 поручения, он не садится как дочерний из за ограничений. Кто либо сталкивался с этим и как обошли ограничения:?
У меня следущая проблема
Есть jar приложение можно ли как-нибудь запуситить его агентом?
Тоесть так чтобы от запускался из от сессии текущего пользователя?
Здравствуйте
...
Надо:
Получать, через виндовый планировщик, с большого числа лотусовых серверов результат выполнения запроса
Код
SELECT System.Server_Users FROM System System WHERE System.STATS_Time_Current=(SELECT MAX(System.STATS_Time_Current) FROM System System)


Уже неделю трахаемся с odbc/jdbc драйверам - толку ноль. Всякие UltraODBCSQL результат выдают, но без ручного вмешательства не работают. Админы лотуса - дубы.

Может есть более прямое решение?

Форум на работе закрыт, если есть идеи - 8-903-533-36-39
Интересные темы:
Список форумов:

Tips. Советы

Earlier this week, Notes 8.5.1 became generally available. While 8.5.1 is "just" a point release, it does contain a few new features that are sure to make for a better experience. The first one that
Markus Seitz has been working with textured workspaces, including skins, in the Notes client. He's finally figured out the "problems" with the 8.5.1 client and provides screen shots to explain it all.

Read | Permalink
Eric Mack was impressed. It took only 10 minutes to upgrade his Domino server from 7.0.4 to 8.5.1. But he needed to reboot the Windows server, which was waiting to complete applying some patches on the operating system. Many hours later....

Read | Permalink

Chris Toohey says there is a Remote Redbook Residency slot available. You don't travel, you tele-commute to help write a Redbook on Best Practices for Building Web Applications for Domino. He has more information.

Read | Permalink
Vaughan Rivett offers a 5-minute tutorial on how to secure a lost or stolen phone running Traveler. Since such a phone has contacts and e-mail it's nice to know there's a "single button" off switch available.

Read | Permalink
Ed Brill posted this link to an IBM survey on a virtualized desktop for the Notes client saying it only takes 10-20 minutes. If you'd like to have a say in this, now's your chance.

Read | Permalink
If you can work in New Zealand, and have Lotus Domino Web based application development experience and certifications, Vaughan Rivett has a couple of job openings.

Read | Permalink
Mikkel Heisterberg has released the GOLD version of his documentation on configuring the Eclipse IDE to run the Notes 8.5.1 client for program development. He provides step-by-step instructions.

Read | Permalink


MARK YOUR CALENDAR FOR IN-DEPTH LOTUS TRAINING, MAY 12-14, 2010, BOSTON
Register by December 31, 2009 to save $350.

Keith Strickland's customer wanted an addition to the iNotes mail template. Keith figured it would be a simple thing, until he started working on it. He's wondering if there's someone else out there who's gotten this sort of thing to work.

Read | Permalink

Now that the threaded comments change has settled in and I've ironed out most of the bugs I thought I'd share the basics of how it works.

First off it's worth considering the end result that is the HTML produced. It looks something like this:

<ol id="comments" class="level_1"> <li> <p>comment 1</p> </li> <li> <p>comment 2</p> <ol class="level_2"> <li> <p>1st reply to comment 2</p> </li> <li> <p>2nd reply to comment 2</p> <ol class="level_3"> <li> <p>a reply to a reply</p> </li> </ol> </li> <li> <p>3rd reply to comment 2</p> </li> </ol> </li> <li> <p>Comment 3</p> </li>
</ol>

Notice how we're using semantic structured HTML rather than a table or a list of DIVs which get indented using CSS!

The beauty of using pure HTML lists is that if you remove CSS from the equation you still get a threaded discussion. With no CSS the above HTML looks like this:

image

So, how do we produce this HTML?

Well, first thing to note is that a child thread is nested inside the LI element of it's parent. You can't close the LI tag for a thread until you've done outputting all its child threads. This is why we can't use a Notes View to do this, as each document in a view is unaware of the document before and/or after it, so it can't close or open tags based on other documents around it.

We need to write the code to handle the logic that opens and closes list items as needed. To do this we need to know two things when outputting the HTML for a document -- what level of nesting are we at now and what level of nesting were we at before.

  • If the document is at a deeper level of nesting we need to open a new OL element and put the LI for the current document in there.
  • If we're at a higher level nesting then we need to close as many of the open OL elements as is needed (depends how many levels deep we were before).
  • If at the same level of nesting just output a new LI element.

Key to this is knowing what level of the thread a document is, which isn't as hard as it might sound.

Beauty is always in simplicity and to keep the solution simple I wanted to build on what was already there. What each reply document already had was a "ThreadSort" field. If you've ever seen inside a Notes discussion template you'll know what that is. Yes?

The format of a ThreadSort field is as such:

MAIN_DOC_CREATED_TIMESTAMP MAIN_DOC_UNID SUB_DOC_CREATED_TIMESTAMP SUB_DOC_UNID SUB_SUB_DOC_CREATED_TIMESTAMP SUB_SUB_DOC_UNID ETC ETC

Which looks like this:

20091015102201 9B1A931E05BFC87D86257650003374A4 20091016041313 9D253F502E386E57862576510032A631 20091016042959 B8053CB5C7FB6A148625765100342F3A

You can see from the above field value that the document it represents is two levels below the main document. You could work that out by looking at the values held it, but we can also work this out using a simple formula:

(@Elements(@Explode(ThreadSort; " "))/2)-1

The level a document is at is one less than half the number of spaces in the ThreadSort field. Simple!

All I had to do was add the above formula to a column in a view. The view below shows all the reply documents categorised by the UNID of the main document they're replies to:

image

Note that the view is sorted first by the ThreadSort field which gives the view the natural order of the discussion. Note also that the last column's value can increase by no more than +1 at a time as you move down the view, but that it can decrease by any amount at any time!

Using this new column the LotusScript in the Web Query Open agent can now output the properly-indented documents using well-formatted HTML.

Here's the LotusScript in use:

Set nav = view.CreateViewNavFromCategory(MainDocID)
Set entry = nav.GetFirstDocument Dim last_level As Integer
Dim current_level As Integer
Dim i as Integer last_level=0 While Not(entry Is Nothing) current_level = entry.ColumnValues(2) If current_level > last_level Then  'open a new OL print "<ol>" ElseIf current_level < last_level Then  'close some OLs For i=current_level+1 To last_level print "</li></ol>" Next Else  'same level - no need to mess with OLs Print "</li>" End If 'open teh LI for this document Print "<li>" 'Output the body of the comment Print entry.document.Body(0) 'Remember level of the last processed doc! last_level = current_level Set entry = nav.GetNextDocument(entry)
Wend 'Finally, close any open OLs,
'based on last_indent_level
For i=1 To last_indent_level replies.add "</li></ol>"+New_line
Next

Obviously the actual code I'm using is a little more involved (nor do I use Print statements), but you get the idea? I just wanted to show how simple the principle is. There are probably even easier ways of doing this, but the beauty of this approach is the way is produces semantic HTML, which is part-styled as a discussion before you even get to applying any CSS to it.

Click here to post a response

Something I've always wanted to do is improve how I send (HTML) emails from LotusScript. While I have the core code pretty much nailed down the way I use it has always been a bit cumbersome and not very flexible.

So, I took the time yesterday to write an Email class. This is how I now send an HTML email:

Dim mail As New Email()
mail.Subject = "Hello"
mail.setText "Here is a link:" + Chr(10)+link
mail.setHTML {<p>Here's a <a href="}+link+{">link</a><p>}
Call mail.Send("foo@bar.com")

The Email class handles creating the document, MIME headers, Streams, HTML wrapper tags etc etc and just leaves it for you to set the subject, content and recipient's address.

Optionally you can specify who the sender should appear as by passing a three element array (name, email address, Notes domain), like so:

mail.Sender = Split("Foo Bar, foo@bar.com, DOMAIN", ", ")

You can also specify the ReplyTo and/or BlindCopyTo addresses if you wish.

The code for the class is as below:

Const ERR_EMAIL_CONTENT_ORDER_WRONG = "You must set the text part to an Email before the HTML part has been set." Class Email Private doc As NotesDocument Private body As NotesMIMEEntity Private mh As NotesMIMEHeader Private mc As NotesMIMEEntity Private stream As NotesStream Private isTextSet As Boolean Private isHTMLSet As Boolean Private isSenderSet As Boolean Private FromName(0 To 2) As String  Sub New() Set Me.doc = web.database.CreateDocument Me.doc.Form = "Memo" 'Set default from address Me.FromName(0) = "CodeStore.net" Me.FromName(1) = "noreply@codestore.net" Me.FromName(2) = "codestore" 'domain Me.isTextSet = False Me.isHTMLSet = False Me.isSenderSet = False 'Create the MIME headers Set Me.body = Me.doc.CreateMIMEEntity Set Me.mh = Me.body.CreateHeader({MIME-Version}) Call mh.SetHeaderVal("1.0") Set mh = body.CreateHeader("Content-Type") Call mh.SetHeaderValAndParams( {multipart/alternative;boundary="=NextPart_="}) End Sub %REM Sub setTextPart Description: Comments for Sub %END REM Sub setTextPart(part As String) 'If HTML part has been set, don't allow this! If Me.isHTMLSet Then Error 1000, ERR_EMAIL_CONTENT_ORDER_WRONG End If Set Me.mc = Me.body.createChildEntity() Set Me.stream = web.session.createStream() Call stream.WriteText(part) Call mc.setContentFromText(stream, {text/plain}, ENC_NONE) Me.isTextSet = True End Sub %REM Property Set Subject Description: Comments for Property Set %END REM Property Set Subject As String Me.doc.subject = subject End Property Sub setHTMLPart(part As String) 'Must be called after setTextPart! 'Now send the HTML part. Order is important! Set Me.mc = Me.body.createChildEntity() Set Me.stream = web.session.createStream() Set mc = body.createChildEntity() Set stream = web.session.createStream() Call stream.WriteText("<html>", EOL_CR) Call stream.WriteText("<head>", EOL_CR) Call stream.WriteText("<style>", EOL_CR) Call stream.WriteText("body{margin:10px;font-family:verdana,arial,helvetica,sans-serif}", EOL_CR) Call stream.WriteText("</style>", EOL_CR) Call stream.WriteText("</head>", EOL_CR) Call stream.WriteText("<body>", EOL_CR) Call stream.WriteText(part) Call stream.WriteText("</body>", EOL_CR) Call stream.WriteText("</html>", EOL_CR) Call mc.setContentFromText(stream, {text/html;charset="iso-8859-1"}, ENC_NONE) Me.isHTMLSet = True End Sub %REM Sub setFromAddress Description: Comments for Sub %END REM Property Set Sender As Variant 'This next line MUST be after the MIME headers are set! me.doc.Principal= Sender(0) +" <"+Sender(1)+"@"+Sender(2)+">" me.doc.InetFrom = Sender(0) +" <"+Sender(1)+">" Me.isSenderSet = True End Property %REM Property Set replyTo Description: Comments for Property Set %END REM Property Set ReplyTo As String Me.Doc.ReplyTo = ReplyTo End Property %REM Property Set BlindCopyTo Description: Comments for Property Set %END REM Property Set BlindCopyTo As String Me.Doc.BlindCopyTo = BlindCopyTo End Property %REM Sub Send Description: Comments for Sub %END REM Sub Send(sendTo As String) If Not Me.isSenderSet Then 'use default Me.Sender = Me.FromName End If Call Me.Doc.Send(False, SendTo) End Sub
End Class

Feel free to offer any suggestions for improvement. I'm no class-writing expert and won't be offended. Consider the above a very rough version 0.1. I've not decided yet what the easiest way to implement it is.

Right now I don't like how setTextPart has to be called before setHTMLPart. Seems an odd requirement to put on the coder just because it's a requirement of the class.

Note that you can just use setText or setHTML if you don't want to write the email twice, which is what you need to do in order to satisfy people with non-HTML email clients. You can send text or HTML only emails. It's just not good practice though!

Click here to post a response

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

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

Author: Oliver Regelmann
Tags: program document
Idea:
Allow an admin to create a program document that runs once at a given day and time.
 
Usage examples:
- "compact -c -daos on -ZU" after a server upgrade
- restrict server at night before an upgrade
 
Actually to achieve this a scheduled program document is created and the admin has to remember to deactivate it later.

Author: Srikanth Bedathur
Tags: Calendar Calendar preferences
Idea:
 By default, Notes calendar entries are not private. So, every time you add a private entry, you must remember to click that option at the top right corner of the calendar entry. And if you forget to do that, it could cause you some embarrassment.
 
I think it will be really nice if it is added to the "Defaults for New Entries" group in Calendar preferences. Let the user choose what he/she wants it to be!

For Lotusphere in January 2010 there will be two new Open Source Lotus Awards: 1. Best Open Source Contribution by an Individual(s) (up to 2) 2. Best Open Source Contribution by a Business Partner These new awards are described in a high level on ...
Author: Andreas Imnitzer
Tags: Contacts Mail Memo
Idea:
I often use the "more.add sender to contacts" action in the memo form. I do like the control window to update more information for the contact at that moment. But it's annoying to have to klick the "contact was successfully added" window away with OK. This window gives the impression of being debugging code. I think, we don't want to know, that what we intended to do, just happened, that's Microsoft's way. I think, we want to only know, when there's a problem.
 

Author: Peter Presnell
Tags: xpages outline
Idea:
As I start to build Xpage applications I find the one design pattern the most frustrating to reproduce is the Outline control.  I really need to get that Outline Java applet out of my life....  The ability to execute commands and load URLs or views/folders into a designate control (panel) would go a long way to allowing me to updgrade many older style Web applications for which I still don't have an easy Xpage solution.

Author: Peter Presnell
Tags: xpages designer help documentation
Idea:
By my reckoning ten new controls were added to Xpages with 8.5.1 and yet when I look at the help documentation for controls I do not see any of these mentioned.  It is not as if the 8.5.0 documentation was setting international best practice so we can hardly afford to fall further and further behind.

Author: Mike Badgley
Tags: what's hot sidebar feature disable
Idea:
How about adding in the ability to disable the What's Hot sidebar feature from the back end?

Author: Craig Wiseman
Tags: widgets sidebar standard client
Idea:
Probably the biggest single issue I've had with the 8.x code stream is troubleshooting bad/corrupt incompatible sidebar items/widgets.
 
A simple example is the Quickr connector. /soapbox Now you'd think since Notes shps with the Connections connector, it would also ship with the Quickr connector so that it would get upgraded as you upgrade the client. But I digress. soapbox\
In the real-life example if you have a version of the Quickr connector installed that is not compatible with a new release of Notes that gets pushed out via smartupdate (like 8.0.1 -> 8.0.2), then the client is hosed until you can get the old connector off and the new one installed.
 
A simple ability to NOT load the 'bad' connector would allow the end user to continue to work until the issue is addressed.
 

Author: Craig Wiseman
Tags: calendar profile
Idea:
 There are so many issues related to corrupted/old/screwy calendar profiles that having a button to clear it from File -> Preferences -> Mail Prefs would seem to be very helpful.
 
That way you could walk an end user through it without even having to open their mail file.

Nicole Shaw from IBM has released a new version of her file navigator. In this version a lot of improvements have been done, including unlocking the client when tree items are expanded, keyboard listening, volume labels are displayed and so on. These ...
Author: Peter Presnell
Tags: client install
Idea:
Based upon the comments of many people doing upgrades to 8.5.1 It seems like opportunity still exists for the install experience to be made a more positive one.  Amongst the areas I believe need improving:-
  1. Reduce the total time to do any given install
  2. Make an install over the top of an existing install as reliable as unisntalling before doing the new install (negating the need for an uninstall)
  3. Reduce the number of environment settings that can cause the install to fail, or install with problems
  4. Provide something worthwhile on the screen while the install is running (e.g. description of new features).
  5. Provide an specific area in technical support for install issues that can be easily accessed and is always updated with the latest information.

Author: Jerry Shelley
Tags: workflow xpages
Idea:
I suggest the next release of Workflow should have a Server Side JavaScript (SSJS) library to complement the existing Client Side JS (CSJS) and LotusScript libraries, allowing Workflow to be brought up-to-date and used in the latest and greatest version of Notes/Domino.

Author: Tommy Valand
Tags: domino designer 8.5.1 lotusscript
Idea:
The current code completion for methods is following no coding guidelines I know of.
 
E.g.
Dim db As New NotesDatabase( "server", "filename.nsf" )
db.Folderreferencesenabled <-- Code Completion
 
The code becomes a lot uglier/less readable as a result. Sometimes I wonder if IBM have a QA (quality assurance) department.. :\
 
Don't get me wrong, there's a lot of great stuff in N/D 8.5.1, but as always with Lotus-products, there's also a lot of little things that are quite irritating..

Author: Tommy Valand
Tags: domino designer 8.5.1 lotusscript
Idea:
The current code completion for methods is following no coding guidelines I know of.
 
E.g.
Dim db As New NotesDatabase( "server", "filename.nsf" )
db.Folderreferencesenabled <-- Code Completion
 
The code becomes a lot uglier/less readable as a result. Sometimes I wonder if IBM have a QA (quality assurance) department.. :\
 
Don't get me wrong, there's a lot of great stuff in N/D 8.5.1, but as always with Lotus-products, there's also a lot of little things that are quite irritating..

As part of the discussion next gen project we have released a new version ( download from here ). This is only a sidepack, not part of the main stream. We'd like to ask you to evaluate the new thread viewer functionality and provide feedback. One ...
Еще записи:
Интересные блоги специалистов:

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

The ability to have different title names for your archive database in Lotus Notes does not seem to exist. Is it possible to have different titles for the same archive databases?
When addressing a memo using the "Select Addresses" (Name Picker) dialog box to choose a name, can a suffix such as (Jr., Sr., Esq., etc..) be displayed with along with the last name/first name?
In order to migrate from Outlook to Notes using the nupgrade tool a local PST file is needed.
This technotes contains information you need for installing and running Cumulative Client Hotfix 2 for Lotus Notes version 7.0.4. [<br>] The hotfix is available for download at Fix Central: http://www.ibm.com/support/fixcentral/. [<br>] This hotfix includes all fixes from Notes 7.0.4 Cumulative Client Hotfix 1 (CCH2). This Client Cumulative Hotfix replaces Client Cumulative Hotfixes 1 for the Notes 7.0.4 build.
In Lotus Notes, if you create a contact that has no email address in your Person Address Book and then attempt to send an email to this person, the client will allow this message to be sent out.
In Domino Administrator Help for 8.5.1 (which is also publicly posted as an Information Center), there is a new topic that conveniently lists a variety of related documentation sources, such as other
When widgets are developed for deployment on IBM® Mashup Center, two IBM development tools can be used, the IBM Mashup Center widget factory or IBM Rational® Application Developer. This article explains how to set up IBM Rational Application Developer so that it can be used to create iWidgets for deployment in IBM Mashup Center.
When widgets are developed for deployment on IBM® Mashup Center, two IBM development tools can be used, the IBM Mashup Center widget factory or IBM Rational® Application Developer. This article explains how to set up IBM Rational Application Developer so that it can be used to create iWidgets for deployment in IBM Mashup Center.
Two issues have been identified in Notes 7.0.4 that occur only in bidirectional languages (Arabic and Hebrew). These issues do not occur in Notes versions prior to 7.0.4 nor do they impact Domino servers. See below for more details. (Original publish date June 5, 2009. See "Change History" below.)
ID upload to an ID vault fails during user registration if "Enforce Public Key Checking" is enabled on the registration server.
Some links are not working in the Release notes - IBM Lotus Notes, Domino, Domino Designer 8.5.1 (readme.html file).
This document corrects errors in the Lotus Domino 8.5.1 Administrator Help content.
Lotus Notes Traveler Server will not start up. It appears the Traveler server will not start due to encountering an exception at startup. The problem can be accompanied by the message "Lotus Notes Traveler - The Lotus Notes Traveler server had a problem opening the message queue TRAVELER. The error was 0x466."
NIFLocateNote does not validate the collection it is given, which can lead to a server crash if an invalid collection happens to be passed in.
Domino notes.ini settings from previous installations that are no longer required and should be removed when installing/running Domino Server Release 8.5.x or higher. NLCACHE_VERSION=4 and Debug_Enable_Update_Fix=32767 have become the default on Domino 8.5.x.
This document provides a description of when Domino places MIME-part bodies into $FILE fields of a message. The behavior changed in Domino 6.0, but Notes.INI parameters were introduced to provide additional control over the behavior.
When you install a language pack on a Domino server, you select the "Replace Language" option so that only a non-English language is used by the server. After doing so, however, if the Domino server generates a Non-Delivery Report (NDR), its subject text appears in English instead of the server's language.
Также почитатай:
Найти документацию можно на сайтах:

В избранное