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

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

  Все выпуски  

Customizing Lotus Notes multi-user install kit for correct XTAF dictionary installation


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

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

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

comp.soft.prog.lotuscodesrore

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

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

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

Класс представляет собой связку Notes и SQL. Агент запускается при активировании ссылки [http://host/db.nsf/agent?OpenAgent&id=111111]. Далее происходит обработка запроса к SQL по полученному праметру id=111111, затем в базе Domino создается notes-документ с параметрами выбранными из запроса

Java class по работе Notes&SQL

import lotus.domino.*;
import java.util.Vector;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.ResultSet;
import java.net.*;
import java.io.*;
import java.util.*;

public class JavaAgent extends AgentBase {
    
    public static java.util.Hashtable parseQueryString(String queryString) {
        StringTokenizer tokens = new StringTokenizer(queryString, "&");
        Hashtable params = new Hashtable();
        while (tokens.hasMoreTokens()){
        String token = tokens.nextToken();
        int equalIdx = token.indexOf('=');
        if (equalIdx != -1 && !token.equalsIgnoreCase("OpenAgent")){
        String name = token.substring(0, equalIdx);
        System.out.println("name " + name);
        String value = token.substring(equalIdx + 1);
        System.out.println("value " + value);
        params.put(name, value);
        }
        }
        return params;
        }
    public void NotesMain() {
        try {
            Session session = getSession();
            AgentContext agentContext = session.getAgentContext();
            Document webdoc = agentContext.getDocumentContext();
            PrintWriter pw = getAgentOutput();
            String qs = webdoc.getItemValueString("Query_String");
            java.util.Hashtable ht = parseQueryString(qs);
            String id = (String) ht.get( "id" );
//            pw.println("ID : " + id);
            Statement stmt = null;
            ResultSet rs = null;
            Connection conn = null;
//            System.out.println("сессии инициировались");
        try {
               Class.forName("com.mysql.jdbc.Driver").newInstance();
            System.out.println("Драйвер загружен");
            }
        catch (Exception ex)
        {
            System.out.println("SQLException: " + ex.getMessage());
        }
        try {
            conn = DriverManager.getConnection("jdbc:mysql://conect);
            System.out.println("Подключение установлено");    
            }
        catch (SQLException ex)
            {
            System.out.println("On connect SQLException: " + ex.getMessage());
            System.out.println("SQLState: " + ex.getSQLState());
            System.out.println("VendorError: " + ex.getErrorCode());
            }
        try {
            stmt = conn.createStatement();
            System.out.println("id " + id);
            String Query = "SELECT * FROM pr_data WHERE auth = " + '"'+id+ '"';// + " ORDER BY id";
            //String Query = "SELECT * FROM pr_data";
            System.out.println("Запрос " + Query);

            try {
                rs = stmt.executeQuery(Query);
                System.out.println("Запрос выполняется");
                }
            catch(SQLException ex)
                {
                System.out.println("SQLException: " + ex.getMessage());
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println("VendorError: " + ex.getErrorCode());
                }
                Database db = agentContext.getCurrentDatabase();
                Document doc = db.createDocument();
                
                while (rs.next()) {    
                    int theid= rs.getInt("id");
                    String fname = rs.getString("fname");
                    String mname = rs.getString("mname");
                    String lname = rs.getString("lname");
                    String message = rs.getString("message");
                    String email = rs.getString("email");
                    String auth = rs.getString("auth");
                    String pindex = rs.getString("pindex");
                    String pregion = rs.getString("pregion");
                    String plocality = rs.getString("plocality");
                    String pstreet = rs.getString("pstreet");
                    String phome = rs.getString("phome");
                    String pcorps = rs.getString("pcorps");
                    String pflat = rs.getString("pflat");
                    System.out.println("Переменные присвоены");
                    System.out.println("auth_code= " + auth );
                    System.out.println("id= " + theid + " ---> ФИО = " + fname + " " + mname +" "+ lname);
                    System.out.println("id= " + theid + " ---> Почтовый адрес = " + pindex +" "+ pregion +" "+ plocality +" "+ pstreet +" "+ phome +" "+ pcorps +" "+ pflat);
                    System.out.println("id= " + theid + " ---> Электронныйый адрес = " + email);
                    System.out.println("id= " + theid + " ---> Текст обращения = " + message );
                    System.out.println("_________________________________");
                    
                
                doc.replaceItemValue("Form", "rlo");
                doc.replaceItemValue("auth", id);
                doc.replaceItemValue("FIO", fname + " " + mname +" "+ lname);
                doc.replaceItemValue("Address", pindex +" "+ pregion +" "+ plocality +" ул."+ pstreet +" д."+ phome +" корп."+ pcorps +" кв."+ pflat);
                doc.replaceItemValue("email", email);
                doc.replaceItemValue("Annotation", message);
                doc.computeWithForm(false, false);
                doc.save();
                }
        } finally {
            if (rs != null) {
                try {
                    rs.close();
                } catch(SQLException ex) {}
                rs = null;
            } //if
            if (stmt != null) {
                try {
                    stmt.close();
                } catch(SQLException ex) {}
                stmt = null;
            } //if
        } //finally
        

        } catch(Exception e) {
            e.printStackTrace();
        }
    }
}


Здравствуйте уважаемые.


Сразу скажу что в Lotus -программировании новичок. Так что не судите слишком строго. )

Дали задание реализовать что-то вроде системы заявок. Скажем кому то нужно дать доступ на интернет (полный или ограниченный определенными сайтами) или выход на внешнюю почту; выход на городские и\или междугородние номера; установка дополнительных программ; дополнительного оборудования и.т.д. Типов таких заявок будет много и не факт что они будут все известны заранее.
В зависимости от типа они будут отправляться разным исполнителям и самое главное форма должна отличаться. (могут появится дополнительные комбобоксы, чекбоксы и текстовые поля для детализации задания)

Помогите с советом как это реализовать? Простота приветствуется. Тем более что нужно только для внутреннего пользования (сейчас это делается надоедливыми звонками потом пишутся письма и после утверждения выполняются непосредственными исполнителями).

Понимаю что вопрос поставил слишком широко.
Помогите хотя бы с этим:

Наверное лучше всего создать представление-справочник и каждый тип-заявки хранить в документах (в которых как минимум должно быть название, исполнитель, тексты для детализации и.т.д ).
В комбоксе вывожу список из справочника и при выборе типа заявки на форме должны заполняться нужные поля из справочника.

Спасибо.






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

Tips. Советы

On 20 October 2010, IBM will host an hour-long Open Mic call on using the ID Vault and Notes Shared Login in Notes/domino 8.5. Questions may be submitted in advance of the call.

Read | Permalink
David J Barry is trying to build a widget that recognizes images. All the documentation he's found is for text recognition. If this is possible, maybe you can point him to some documentation.

Read | Permalink
Patrick Picard has some information on a job opening in Vancouver,Canada for a senior developer. He's posted a link for even more information.

Read | Permalink


STRUGGLING WITH EXPORTING NOTES DATA TO SPREADSHEETS? NO MORE!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes!

Try IntelliPRINT NOW!

Amanda Bauman has posted information on some of the new features you can use in the product wikis. And, as always, if you have suggestions for more changes, there's a link to accept your feedback.

Read | Permalink

Yesterday I talked about how and why I'd used a small downward arrow on the navigation on the website below in order to add a little finishing touch to it.

image

Today I'll talk about how I did it.

Creating The Site in Fireworks

First thing we need to do is create a new document in Adobe Fireworks (you can use any graphics editor, as the principles are the same) and choose a custom canvas/background colour.

image

Then, on the new document, add two rectangles - a white one in the centre which is the full height of the canvas and another one at the top which is the full width.

Then add some text to act as the content - a title, the menu items and the body. You should end up something like below. It looks a bit like a website. But it's very boring.

image 

To make it a little bit more interesting we're going to add an arrow.

Creating The Arrow

First thing to do is add a small square of the same colour as the header area. To make a square you just use the rectangle tool and hold down shift while drawing the shape on screen to make the sides of equal size.

image

Now we need to rotate the square by 45 degrees, which we do using teh Numeric Transform tool from the Modify -> Transform menu or pressing Ctrl+Shift+T.

image

Choose Rotate and enter 45 in the angle box and press OK. You can then drag the rotated square up to the menu area and align it with a menu item and move it about until you have it looking just so.

image

Now we need to select both the header rectangle and the small square by holding down shift as we click on each. With both selected you can merge the two shapes by choosing Modify -> Combine Paths -> Union from the menus. You'll then have a single vector-based shape like the one below:

image

Any change to the colour or fill of this single shape will now affect both the arrow and the rectangle. More importantly though we merged the two shapes so that the drop shadow applies correctly, as you can see below:

image

What we end up with is a design like this. Still a bit boring, but not half as boring as the design without a shadow or arrow!

Once you've played with the colours and maybe added a gradient fill to the header you'll end up with something you're happy with, like this:

arrows

Now we need to export the images we'll need to use with the CSS to achieve this look. Add three export slices as below:

image

The two thin slices will make the repeating background image of the body and the header area. The larger slice will become the background to the menu items.

The three images should look like this:

 

1. nav_li_bg2.body_bg 3. header_bg

Tomorrow I'll show you how to use these three images with a sprinkling of CSS to create the design above in HTML. I was hoping to do that all today but this is taking too much of my morning up already...

If you fancy a tinker in the mean time here's the editable Fireworks PNG file which will show you how I did what you see above.

Click here to post a response

Love or loath data-grids they're a quick and useful way to show a view on the web. They have to be used with caution though and whether you use them at all or not is down to the requirements of each application.

One shortcoming of data-grids is in dealing with really big views of data. Say, like 40,000 documents, as in the Fake Names address book. Here we wouldn't want to load all that data in one go.

One option for large datasets is to use paging - where the user see a "Page X of Y" message and navigational buttons. Solves the problem but not particularly user-friendly are they.

A much better option is to use "lazy loading", which is what the following Flex DataGrid demo does. As you can see from the scrollbar it's a large view (it's feeding off the 40,000 docs in the NAB I mentioned earlier). However, it has only actually loaded the first 100 documents.

Either scripts and active content are not permitted to run or Adobe Flash Player version 10.0.0 or greater is not installed.

Get Adobe Flash Player

If you use the scroll-bar arrow (avoid dragging the scrollbar for best results) to move to the end of the first 100 documents you should then see a flicker as the next set of 100 documents loads from the server. Then drag the scrollbar right down to the very bottom and see the very last set load (all those in-between won't load - until needed).

Cool, no?

It uses Flex 4's new AsyncListView, which James Ward talked about here. What you see above is his code re-worked to adapt to use with Domino's URL rules and using XML rather than AMF, which is something I'd like to look in to using with Domino at some point if I get the chance.

Shortcomings

As with any paged set of data it all falls down when you try and sort a column or filter the data. In both cases you'd need to over-ride the defaults for these events to force a trip back to the server. Probably possible, but I don't have time to look in to it.

The Code

The Flex code used is exactly the same as on James Wards' site but I replaced the RemoteObject with an HTTPService, like this one:

<s:HTTPService url="http://www.codestore.net/fakenames.nsf/PeopleXML?OpenView" resultFormat="e4x" id="ro" method="GET"/>

And I modified the code that handle sending/processing date requests to look like this:

var asyncToken:AsyncToken = ro.send({'start':startIndex+1, 'count':numItemsToFetch}); asyncToken.addResponder(new AsyncResponder(function result(event:ResultEvent, token:Object = null):void { var people:XMLList = event.result.person as XMLList; for (var i:uint = 0; i < people.length(); i++){ items.setItemAt(peoplei, token + i); } }, function fault(event:FaultEvent, token:Object = null):void { trace(event.fault.faultString); }, startIndex)
);

The rest of the code you can get from James' site. Enjoy.

Click here to post a response

Norman Email Protection 5.0, a high performance email security solution available as a product or a service, is now available. Norman Email Protection 5.0 integrates with Microsoft Exchange, Lotus Domino, and all other SMTP standards-based servers.

Read | Permalink


NEW!!! NOTES AND DOMINO 8.5 UPDATE COURSES FOR DEVELOPERS AND ADMINSTRATORS
Try a free course at www.tlcc.com/dompower85.

Mitch Cohen has found the blog by Jeff Mitchell, the Notes install project lead at IBM, to be a great source of useful information. He's posted a link to Jeff's site.

Read | Permalink
Victor Toal found Technote 1439208, which applies to Domino 8.5.1 on Windows, and just had to find out more. He's posted his findings of what installations might be at risk and which switches can trigger a crash.

Read | Permalink
Bob Balfe noticed his widgets behaving strangely and did some investigation. He's posted his findings to prepare you, just in case your widgets get strange ideas.

Read | Permalink

Yesterday we looked at the how, using Fireworks, we can create arrow-like images to add to our web site's main navigational menu. What we're aiming for is a site that looks like this:

arrows

Where the current menu item is highlighted by an arrow (ignore the fact it's on the wrong "tab" in the image above). To do this we exported three images from our Fireworks mockup, which look like this:

 

There's nav_li_bg.png nav_li_bg and header_bg.png  header_bgand body_bg.png body_bg . That's all we'll need.

Creating The Webpage

The HTML for our page is structured simply like this:

<div id="container"> <div id="header"> <div id="navbar"> <ul></ul> </div> </div> <div id="content"> </div>
</div>

With some content in place, but no CSS it looks like this:

image

Now, let's start adding some CSS. First we're going to center the container and give the main body a background.

body{ background:#C0C0C0 url(body_bg.png) repeat-x top left;
} #container{ width:829px; margin:0px auto; background-color:#fff;
}

The page then looks like this:

image

Now we need to continue the dark grey bar across the page and align the header items. To do this we use the following CSS:

#header{ padding:0px; margin:0px; height: 145px; background:#666 url(header_bg.png) repeat-x top left;
} #navbar{ overflow:hidden; position:absolute; top:109px; height:70px;
} #navbar ul li{ background:none; padding: 0 12px; list-style-type:none; float:left;
}

Notice the header has a fixed height of 145px which is the same height as the background repeater image we created for it. Notice also that we've positioned the navbar div using absolute positioning so that it sits at the bottom of the header div. I've missed a few bits out, but you can see all the CSS later. The site now looks like this:

image

All that's left to do is add the arrow to the selected list item in the menu. The HTML for the selected item looks like this:

<li class="selected"><a href="/">About</a></li>

Now, bear in mind that the background image we created looks like this:

nav_li_bg

The CSS we need to add to place this image on the selected link looks like:

#navbar ul li.selected a{ background:transparent url(nav_li_bg.png) no-repeat scroll center bottom; padding-bottom:25px; }

There are a couple of tricks in use. Firstly that we've aligned the arrow image with the bottom and the centre of the <A> tag. No matter how wide (or tall) the link is the fact the image itself is quite wide should mean the arrow is always in the centre. Even with a wider link the background of the header itself should bleed through. If not then just make the background image much wider.

The second pivotal trick is to add some extra padding to the bottom of the selected link. This pushes the background image downward, as it's aligned with the bottom of the link tag, while leaving the actual link text where it needs to be. That's all there is to it really. Just one clever little trick to make the selected link appear taller than the others.

The height of 25px isn't some magic number. It just happens to be the height needed for the image I created. In practice getting everything to align properly is a matter of trial and error while notching the height up and down a few pixels at a time. A bit fiddly, but worth it!

You can see the final HTML page here and you can download the necessary CSS from there. Happy styling!

For you Domino lovers, sorry it's not in an NSF file. You'll just have to work that bit out for yourself.

Click here to post a response

Setting the delivery priority of a message affects when the message is sent from your email client to the recipients'. Using delivery priority can help prevent overloading mail servers. Low priority
By Joe Dolittle

We seem to be attracting a lot of interop questions here in the Lotus Q&A column for DominoPower. This time, we've got a letter from reader Sari Cahya, who asks:

First, management told us we were to completely stop looking at Facebook and Twitter. Then, three weeks later, they got a whole social networking bug up their bums and insisted we implement something on our servers.
Now what?

It's always fun when management has a Dilbert moment, but we also always feel for the IT people on the ground who have to deal with the problem.

As it turns out, we ran a short news item on this very topic about a year ago.

According to the IBM synch.rono.us blog, you can now download Facebook and Twitter (and, yes, MySpace, too if you possibly care) straight to your server, install them, and be up and running in less time than it takes to tweet about the last food item you injested.

Good luck, and enjoy!

Joe is a ZATZ associate editor. Prior to this job, he was customer support manager for the FileFlex database engine.

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

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

I've created a new project - called Home Page Template. The project contains a couple of common controls and refers to Extension Library controls that are often needed when building personal or topic oriented home pages. For developers the project ...
Author: Theo Heselmans
Tags: cursor editing highlighter permanent pen
Idea:
When using the permanent pen, having the cursor change is a good idea, but the cursor lacks a 'caret', so it is difficult to position.
If one could add a vertical line to the cursor (the horizontal one is very confusing)
The same applies a bit for the highlighter cursor (it doesn't have a horizontal line).  
See the examples above:
- top icons: current situation
- bottom icons: my suggestion

Author: Theo Heselmans
Tags: text editing highlighter
Idea:
Some small 'Highlighter' enhancements asked for by my customers:
- Make it more obvious how to 'erase' highlighted text (e.g. by adding a 'transparent/eraser' highlighter)
- When selecting permanent pen, highlighter should optionally switch of automatically
 

Author: Patrick Kwinten
Tags: tables nested
Idea:
I have no idea what the reason is behind the restriction of levels of nested tables (8, I believe)
 
Often you have a rich text field nested in a couple of nested tables, so the level users can create is limited. Especially nested tables are used to create document that will be published on the web.

Author: Matteo Veronesi
Tags: OneUI themes ui css
Idea:
Create a software/Designer component that allows you to create custom themes.
Using a graphical user interface should be possible to define the positions of the various components(Banner, TitleBar, Main, Content) and look and feel.
The output will be a new theme similar goldTheme, greenTheme .. and you can install on the Domino server or all 'inside of' nsf

Author: Vlad Sh
Tags: richtext hotspot context menu links url
Idea:
Now in the context menu of hotspots there are 2 items:
Copy - copies the visible contents of an entire document;
Copy as Document Link - puts to the clipboard a link to the whole document.
But sometimes you want to copy the link, which indicates hotspot, and if access to edit a document is missing, copy the link fails...
I ask to add item "Copy URL" or "Copy Link" to the context menu of hotspot.
 

Author: Craig Wiseman
Tags: windows Phone 7
Idea:
 At this point, the primary platforms are Blackberry, Android, and iPhone. Windows Phone 7 has launched, and it has a reasonable chance to add itself to the more popular smartphone OSes. 
 
I would imagine that WinPhone7 will play best with Traveler's activesync, and I'm sure that IBM needs some *cough* lead time to get it all up to snuff. It would be very helpful to have Traveler ready to go when users start requesting support.
 
 

We've  improved some parts of the OpenNTF web site and ...
Еще записи:
Интересные блоги специалистов:

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

In a customized Lotus Notes multi-user installation, Lotus Notes XTAF language dictionaries are installed in a single user-based directory structure rather than the expected shared directory structure.
User receives error when trying to access a saved window tab whose document had been deleted in the previous Notes session
You can download Lotus Notes SQL 8.5.1 from the IBM Software Downloads site.
When upgrading Domino or troubleshooting design issues, keep in mind that most Domino templates do not have their replica id changed from release to release. Two prominent exceptions are the Mail template (which also has its file name changed from major release to major release) and the Bookmark ...
You can view your device security compliance status, the IBM® Lotus Notes® Traveler security policy setting values, and the device value for each policy setting. Use this information to modify your phone settings to ensure that your device settings are in compliance with the security policy. To ...
This topic describes known Nokia S60 device restrictions and limitations with IBM® Lotus Notes® Traveler. h2 Install h2 Table 1. Install issues Problem Details "Unable to install" Error when overinstalling (upgrade) using a sisx file launched from Messaging Inbox This occurs when you have ...
Introduction In an effort to make the user experience and user interface more flexible and customizable for customers, the iNotes team has implemented a new URL argument, layout. It has been available since Domino 8.5.1. These enhancements can be utilized wherever iNotes URLs are used, ...
Introduction This article introduces you to the basic techniques of how to customize of Lotus iNotes. This information applies to Lotus iNotes 8.5 and later releases. The first thing you need to know is that Lotus iNotes is not a traditional Domino Web application. A traditional Domino Web ...
br p This table contains features described in the "What’s new in the Lotus Notes 8.5 client" topics of the IBM Lotus Notes 8.5 Information Center and the IBM Lotus Notes and Domino 8.5 Reviewer's Guide. Each row indicates the minimum version of server, ODS, and template required for the ...
If you are working offline and you click Send by mistake, you can still prevent the message from being sent. Before going back online, delete the message from your outgoing mailbox.
A return receipt is a message that tells you that someone has opened an email you sent them. When the person opens the email, you get a message in your Inbox with the subject, recipient, and date time he or she opened the email. Here is an example return receipt: If you want to get return ...
These are known issues using Apple devices with Lotus Notes Traveler. These issues have been reported to Apple support. This article may not be the most recent information but will be updated with new information as it is known. Bug Problem description and Symptoms Workarounds ...
Также почитатай:
Найти документацию можно на сайтах:

В избранное