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

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

  Все выпуски  

Бюллетень "Lotus Notes CodeStore" No 88 от 2008-10-13


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

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

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

comp.soft.prog.lotuscodesrore

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

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

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

На Lotus Domino 6.5.3 стоит Босс-Референт, есть агент который "толкает" договора по маршруту, известно что он запускается раз в 10мин. Где можно посмотреть что он завис, когда последнийраз запускался, вобщем надо как-то проанализировать причины сбоев в работе. То что он завис я и так знаю, из того что договора не уходят со стадии обработки сервером, но не знаю средств Lotus позволяющих получить тербуемую информацию. Извените за возможно неграмотный вопрос, подскажите хотябы в каком направлении двигатся.
Сервер Lotus Domino 7.0.3 работает под Microsoft Vista SP1
После завершения (или рестарта) сервера он всегда завершается с ошибкой и запускает диагностику.
И потом в следующий свой запуск начинает работу с проверки целостности баз данных.
Кто-нибудь сталкивался с подобной проблемой?
Решается ли данная проблема или же некая проблема совместимости Domino с Vista ?
Надоело считать копейки?
Ваш шанс начать свое дело!
Заходите сюда и вы все об этом узнаете ГЛАВНОЕ НЕ ПОЛЕНИТЕСЬ И ПРОЧИТАЙТЕ ВСЕ ДО КОНЦА.
Есть форма FTtype и связанный с ней view - FTypeView
...
Интересные темы:
Список форумов:

Tips. Советы

Getting back to Wednesday's topic of logging in via Ajax I decided to see if I could take it beyond the basics.

The basics being that we use Ajax to POST login details to /names.nsf?login and wait to see if there's a Domino session cookie attached to the response.

The trouble with this basic approach is that it only caters for authentication and not authorisation. What if the login details supplied are ok, but they're not allowed access to the page being requested in the RedirectTo field? With the code I showed you the other day it would assume all was ok as a DomAuthSessId cookie is returned and it would simply reload the page. At this point you'd see a standard login form with a message explaining that you're not allowed in.

How Can We Cater for Authorisation Issues?

Even if there's a session cookie returned we still need to examine the actual page itself to check it's not another login form. I've seen various ways of doing this, which all seem to rely on finding certain text (such as "You are not authorized") within the HTML of the page itself. 

Now, you know me, I'm just not going to be happy with that solution am I. I wanted something more universal/stable, so I looked in to using HTTP headers to convey the actual state of the login request.

What I came up with is a header I've called Domino-Auth-Response. You can see an example of it here in the headers received from Domino following an Ajax login request:

login1

Foolishly I'd tried to login to as a user (called One Test) with no access to the database (Anonymous = Author. Default = None. Changed for purposes of this demo). Instead of reloading the page, which, in effect, locks the user out I can trap the above scenario by inspecting the headers of the returned page, using a line like this in the "onSuccess" function for the Ajax call:

if (transport.getResponseHeader("Domino-Auth-Response")){ //problem

No need to try and search the page. If the above header is found we can handle it in a much more graceful manner, which I'll discuss in a mo. First, about the header.

How To Add a Custom Header to Login Forms

Let's assume you have a domcfg.nsf on your server and you have the right to make changes to the $$LoginUserForm within it.  Open the form and it will look like this by default:

login2

Beautifully designed.

Look inside the Computed Value I've pointed to and you'll see a formula like this:

login3

Although I removed some bits, you get the idea? Depending on the value of the Domino-set field called reasonType a message is shown to the user. This is where you'd be able to internationalise the server if needs be.

Now let's look at the code again and see how we can use it add our new header:

login4

As simple as that! Whatever message is shown to the user we can find this out without having to look inside the HTML. We also know the "reason type" code. This in itself could replace the need for returning the text of the message. On its own the reason code is useful for processing the login in our JavaScript.

Dealing With Unauthorised Logins

If the response is to say "you're not allowed to do that" then it's a fair bet that the user doesn't want to remain logged in as that user if they don't have access. We could log them out simply by over-writing the cookie we just received. Either we log the user out completely by setting its value to "" or (if they were already logged in) we can keep them logged in as the previous user by remembering the old value of the cookie and resetting it to that.

You can give this a go from the DEXT homepage. First login as Dext User (password=dext) . Once logged in notice there's now a "re-login" link up there. Use the login form to re-authenticate as One Test (username and password are both test1).

One Test has no access to the application so you should see a message to that effect. Now refresh the page. Notice you're still logged in as Dext User!

We can do this because the DEXT JavaScript object records all the cookie values when the page loads. We can look to it for the previous session code and reset the cookie to that.

A much more sensible approach. No?

In Summary

This whole exercise has been as much of a proof of concept as anything else. How much use it would be in a real world application I don't know. What it doesn't do is trap any request from the server for the user to login. It only works when the user chooses to login.

The only way we could create a system that relied on it would be to have the onclick of any link/button check the current user's access before opening a form or editing a document. If the current user has access then just carry on. If not then we can display our Ajax login form and set its RedirectTo field to the href value of the link clicked.

Still, whether or not is has a true practical use, it's a good example of using the @SetHTTPHeader function if nothing else and it's been fun playing. Hopefully it's of use to somebody.

Click here to post a response

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

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

Author: Stuart McIntyre
Tags: quickr photo image ldap
Idea:
The Lotus product range is very inconsistent when it comes to manging user photos.
 
You can paste them into a Domino directory to use in Notes. Sametime wants them added to the jpegPhoto field in the LDAP directory.  Whereas Quickr wants them available via a WebService (but gives no clues as to how to do this), and Connections expects all users to add their own photos! Arrgghh!
 
So, please Lotus, can you make this consistent for the next round of new releases.  Saemtiem seems to have the most workable and 'standard' LDAP solution, and so I think this is the one that should stay. Quickr and Connections should both support the access of photos from the jpegPhoto attribute in the LDAP so that the images are consistent.
 
if individual Connections admis wish to then allow their users to change the photos, then thats fine, but lets get them in from LDAP in the first place!

Author: Bruce Lill
Tags: db2 domino web2.0
Idea:
With Domino 8, Lotus provided a free copy of db2 to use as the filestore. This will help you understand how to use the information in db2 to improve your server based applications. Build Query views that will show documents from different Domino database but work like a normal view to allow you to open the documents. Build a dynamic view that lest you select what data to show in any column, so you can reduce the number of views. Work with SQL queries to get the data you need, in the format you can use. Use JavaScript and JSON to create dynamic views for the web that change based on the parameters passed. What are the limitation and problems can occur like no grand total in views.

Author: Paul Davies
Tags: save hyperlink document
Idea:
You can currently drag any Notes document to the file system and it will be dropped as a notes:// protocol hyperlink back to the document.
 
This very same funcionality should also be provided by a menu option as this is frankly more intuitive
 
This is in addition to the idea of saving mail messages to the file system as is done in Outlook (linked)

Author: William Beh
Tags: page property
Idea:
When creating a new page directly under content root, by default it will be display on the navigation. To hide it, you have to use XML configuration. You have to be more technical to know how to set it.
They could make it much simpler by putting the setting directly in the page property. An simple checkbox to select "Hide from navigation" would be good.

Author: Jens Schwendemann
Tags: Alarms meetings availability availabilty hours
Idea:
Hi all,
ok I'll try to put this a simple as I can.
 
Let's say my availabilty hours in the preferences are set from Mon-Fri 8:30 am - 5 pm. Let's also say some people do not follow those availability hours and invite me to a meeting on say Thu 8:00 am. Let's further pretend those people are too important to decline the meeting and I have to get up half an hour earlier that specific day. Everything "fine" till now. I accepted the meeting and - you guessed it - on the day of the meeting am to late as I always come into office on Thursday 8:20 am. When I start my Notes it does alarm me, that I missed an appointment but that is too late anyway.
 
Here goes the idea:
 
I would like to have a option in the preferences that allows me to have special settings for calendar entries out of my availability hours. Best would be that I get informed by a popup the day before the meeting takes place. Even better would be, that this takes place, when I'm shutting down Notes. So in this example Notes would inform me on Wednesday evening 5:10 pm when I'm closing my notes and head of home. I then realize that I have to come earlier next morning to get in time for the meeting and set my alarm clock on my mobile that half an hour earlier. I would however like to get informed the standard-half-an-hour-before-the-meeting-starts way also as I may be in the office that thursday in time :-)
 
I know that this mainly makes sense for those of you that don't synch their mobile device whith your notes calendar, but hey I think there must be thousands of people whose company doesn't allow synch software to be installed on corporate PCs and who doesn't have that BlackBerry handy.
 
Cheers Jens Schwendemann

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

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

64-bit version of WebSphere Application Server 6.1 supported on these operating systems.
You can start the Domino server without problems on an AIX system; however, starting the server through the server controller ( server -jc -c ) does not work.
A folder or subfolder with alias equal to the name of another folder or subfolder moves back to the original location if drag and dropped to a higher level.
Using LEI, DECS, or LSX on the system i (iSeries), you create a connection to a data source using ODBC, but it fails.
In Lotus Notes, if you enable the Out Of Office (OOO) agent from a local replica and shut down the Notes client before replication, the console displays an error message. Why does this happen?
You're running scripted activities on a Domino LEI server. You notice in the LEI log that LEI activities appear to run but show a runtime of 0 seconds. In addition, the pid.nbf file shows a large number of LEI activities building up until the server eventually crashes.
Running tell amgr run commands with database names containing spaces creates "db filename" syntax error.
A user receives a piece of encrypted mail on their BlackBerry device but the mail opens without prompting for the Notes ID password, which has been embedded in the mail file.
Также почитатай:
Найти документацию можно на сайтах:

В избранное