<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lotushints &#187; Lotus Notes</title>
	<atom:link href="http://www.lotushints.com/category/lotus-notes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lotushints.com</link>
	<description>Lotus Notes tips &#38; tricks you always hoped you will not need</description>
	<lastBuildDate>Thu, 29 Dec 2011 09:47:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Lotus Notes 8.5.1</title>
		<link>http://www.lotushints.com/2009/10/lotus-notes-8-5-1/</link>
		<comments>http://www.lotushints.com/2009/10/lotus-notes-8-5-1/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 06:00:47 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Object-oriented development]]></category>
		<category><![CDATA[custom classes]]></category>
		<category><![CDATA[LotusScript]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=444</guid>
		<description><![CDATA[With the abundance of posts out there, I thought I would chip in my 5 cents worth. Yes, I know I am a bit late. Release 8.5.1 is for LotusScript developer everything he could ever hope for. Specially if you are into OO programming. Finally you don&#8217;t have to check your old classes what parameters [...]]]></description>
			<content:encoded><![CDATA[<p>With the abundance of posts out there, I thought I would chip in my 5 cents worth. Yes, I know I am a bit late.</p>
<p>Release 8.5.1 is for LotusScript developer everything he could ever hope for. Specially if you are into OO programming. Finally you don&#8217;t have to check your old classes what parameters they take, you can easily locate them by going to class definition and helper works. Now, you have really no excuse to start OO development in LotusScript.</p>
<p>On the other hand, 8.5.1 introduced some strange bugs. My colleague found an interesting bug while editing forms. For some reason, formula wasn&#8217;t saved when the document was. I think he solved it by removing formula completely and then re-pasting it back. Another funny thing is code formatting. Still not working properly. Hope to see it solved in 8.5.2.</p>
<p>Don&#8217;t get me wrong. I take 8.5.1 over any release any day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/10/lotus-notes-8-5-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are Notes really built for Java?</title>
		<link>http://www.lotushints.com/2009/08/are-notes-really-built-for-java/</link>
		<comments>http://www.lotushints.com/2009/08/are-notes-really-built-for-java/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 06:00:36 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Upgrades]]></category>
		<category><![CDATA[crypto]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=419</guid>
		<description><![CDATA[This is what I came to ask myself constantly this past few months. Lately, I&#8217;ve been noticing that vast majority of all erra on server is due to some java library error. For example, we experience an annoying issue, when at certain point, Notes decide that some Crypto library is missing and doesn&#8217;t load up [...]]]></description>
			<content:encoded><![CDATA[<p>This is what I came to ask myself constantly this past few months. Lately, I&#8217;ve been noticing that vast majority of all erra on server is due to some java library error. For example, we experience an annoying issue, when at certain point, Notes decide that some Crypto library is missing and doesn&#8217;t load up successfully. Not until you restart the server that is. IBMs suggestion was to reinstall the server, as apparently corresponding jar file got corrupted somewhere during upgrade (WTF?!). All fine and well, but this is a production server. A server that hosts thousand users daily. A server that quite frankly has no other issue but this one. There is definitely not going to be any reinstall taking place in near future.</p>
<p>Are Notes really built for Java? Because at this point it certainly fails to look so.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/08/are-notes-really-built-for-java/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Notes rendering engine</title>
		<link>http://www.lotushints.com/2009/06/notes-rendering-engine/</link>
		<comments>http://www.lotushints.com/2009/06/notes-rendering-engine/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 07:00:11 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=372</guid>
		<description><![CDATA[About a year hence, it was time to refresh web design of my company&#8217;s web site. We decided to stick to new and improved web page standards and thus separate style and scripts from content. All well, but one simple thing. Our CMS never forced it&#8217;s users to use HTML in their code. We always [...]]]></description>
			<content:encoded><![CDATA[<p>About a year hence, it was time to refresh web design of my company&#8217;s web site. We decided to stick to new and improved web page standards and thus separate style and scripts from content. All well, but one simple thing. Our CMS never forced it&#8217;s users to use HTML in their code. We always relied on Notes rendering engine to render Notes documents body contents to what should be displayed on the web.</p>
<p>Not a good idea. I don&#8217;t know, when was the last time, someone at IBM took a look at their rendering engine, but this just isn&#8217;t it. Unordered lists don&#8217;t close, leading to a total mess of your layout. On numerous occasions, a div tag marked as pass through text got put to the bottom of contents and not at the spot where it was in the body field, leading to some more confusion. And what killed it for me was a sudden br tag flood in the HTML for no apparent reason. All 6 of them were gone when text was put in the same line as pass through text and appeared right after I put the text back in new line. And all of this appeared randomly, which amused me for a while.</p>
<p>So, I guess it is no wonder, why there are so many CMS application in Notes, where content needs to be entered as HTML. However, in my experience, you as a developer or admin of such system can be glad if a content editor knows how to use Lotus Notes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/06/notes-rendering-engine/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Upgraded myself to R8 certification</title>
		<link>http://www.lotushints.com/2009/04/upgraded-myself-to-r8-certification/</link>
		<comments>http://www.lotushints.com/2009/04/upgraded-myself-to-r8-certification/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 05:57:14 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[composite applications]]></category>
		<category><![CDATA[document collection]]></category>
		<category><![CDATA[dxl]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=316</guid>
		<description><![CDATA[So now, I am titled Lotus Notes 8 Advanced application developer. For those of you who are still not sure weather to go or not&#8230; Go. It is not that difficult. But first learn a thing or two about Composite applications, DXL import/export and new document collection methods.]]></description>
			<content:encoded><![CDATA[<p>So now, I am titled Lotus Notes 8 Advanced application developer.</p>
<p>For those of you who are still not sure weather to go or not&#8230; Go. It is not that difficult. But first learn a thing or two about Composite applications, DXL <a href="/2009/03/custom-web-forms-part-2-importing-form-from-dxl/">import</a>/<a href="/2009/03/custom-web-forms-part-1-exporting-form-into-dxl/">export</a> and new document collection methods.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/04/upgraded-myself-to-r8-certification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom web forms &#8211; Part 3: User input form</title>
		<link>http://www.lotushints.com/2009/04/custom-web-forms-part-3-user-input-form/</link>
		<comments>http://www.lotushints.com/2009/04/custom-web-forms-part-3-user-input-form/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 08:00:25 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Basic]]></category>
		<category><![CDATA[Custom forms]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[form]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=297</guid>
		<description><![CDATA[In parts 1 and 2, we looked at exporting forms to DXL and then importing them back. In this short article,we will look at a simple form that will allow users to assemble their own web form. So what do I need? First, we need to assmble list of fields user needs to add. Each [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.lotushints.com/category/custom-forms/">parts 1 and 2</a>, we looked at exporting forms to DXL and then importing them back. In this short article,we will look at a simple form that will allow users to assemble their own web form.<br />
<span id="more-297"></span><br />
<strong>So what do I need?</strong></p>
<p>First, we need to assmble list of fields user needs to add. Each field usually has a label that describes to a user what information should he enter. Then, some fields are plain text, rich text, checkboxes, etc. Also, fields can have a default value.</p>
<p>Keeping that in mind, a basic web form usually has a field named $$Return, that specifies what happens on document submit. Also, it would be nice, if we allowed our users to enter name of the form and some short description that will be presented in web form.</p>
<p><strong>The implementation</strong></p>
<p>For basic forms, we don&#8217;t need anything fancy. No rich text for short description, probably only simplest field formats (plain text, rich text, radiobutton and checkbox) and probably not more than 10 fields. Since this example is here just to prove a case, I will limit it to 5 different fields.</p>
<p>So, our list of fields now looks like this:</p>
<ul>
<li>form name</li>
<li>form description</li>
<li>return page</li>
<li>5x field that will hold field name</li>
<li>5x field that will be used for field type</li>
<li>5x field with value (in case of radiobutton and checkbox)</li>
<li>5x field with default value</li>
<li>5x field with label</li>
</ul>
<p>The &#8220;finished&#8221; form is displayed in picture below.</p>
<div id="attachment_299" class="wp-caption aligncenter" style="width: 300px"><img class="size-medium wp-image-299" title="myclientform" src="http://www.lotushints.com/wp-content/uploads/2009/04/myclientform-300x158.png" alt="Filled user's form" width="300" height="158" /><p class="wp-caption-text">Filled user&#39;s form</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/04/custom-web-forms-part-3-user-input-form/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Banner animator v1.1</title>
		<link>http://www.lotushints.com/2009/03/banner-animator-v11/</link>
		<comments>http://www.lotushints.com/2009/03/banner-animator-v11/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 08:00:30 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Basic]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[animator]]></category>
		<category><![CDATA[banner]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=276</guid>
		<description><![CDATA[In order to display multiple banners in single spot (and to keep web site from becoming tacky), you will need some sort of client side script that will display first one banner, then the second one etc. This is called banner animator (or even ad animator). In this case, the functionality is written in JavaScript, [...]]]></description>
			<content:encoded><![CDATA[<p>In order to display multiple banners in single spot (and to keep web site from becoming tacky), you will need some sort of client side script that will display first one banner, then the second one etc. This is called banner animator (or even ad animator). In this case, the functionality is written in JavaScript, with some help of HTML (for element positioning) and CSS (for element appearance).<br />
<span id="more-276"></span><br />
<strong>What does that have to do with Lotus Notes?</strong></p>
<p>Absolutely nothing. The only connection to Lotus Notes is, when you integrate this functionality into your database. It is a simple and trivial solution. I needed to create a form that will represent one single banner. This form contains name, URL, image, sort order etc. Look-up view for obtaining sorted banner list was created and some web forms that are already in &#8220;production&#8221; had to be altered, for loading of JavaScript class etc.</p>
<p><strong>Prerequisites</strong></p>
<p>This functionality depends heavily on <a href="http://jquery.com/">jQuery library</a>. It can be obtained <a href="http://docs.jquery.com/Downloading_jQuery">here</a>. I recommend minified version if you plan on hosting it yourself or, you can use <a href="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js">Google Code link</a> to link it from Google.</p>
<p>Next you need to obtain the <em>adPlayer </em>library. It is located <a href="http://dl.getdropbox.com/u/599331/jslibs/adPlayer.js">here</a>. I would ask you to not link the library directly from this link, but download it to your server and link it from there.</p>
<p><strong>Getting started</strong></p>
<p>In order to implement this application, you will first need to make a small HTML adjustment in the place where you want banner animator to be implemented.</p>
<pre>&lt;ul id="adPlayer"&gt;
    &lt;li&gt;&lt;a href=""&gt;&lt;img src="images/ad1.jpg" /&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=""&gt;&lt;img src="images/ad2.jpg" /&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=""&gt;&lt;img src="images/ad3.jpg" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id="adPlayerNav"&gt;&lt;/div&gt;</pre>
<p>Obviously you should insert link of your desire. The same goes for image <em>src </em>and <em>alt</em> parameters. Also, number of <em>li</em> elements can vary.</p>
<p>Next, at the bottom of the page (where your JS libraries are loaded and on load events are set), you need to load both .js files  (<em>jQuery </em>and <em>AdPlayer</em>) , if you do not already have them. Next, add following (or if you already have onload event loader, just call loadPlayer() function).</p>
<pre>&lt;script type="text/javascript" language="javascript"&gt;
    $(document).ready(function() {
        loadPlayer();
    });
&lt;/script&gt;</pre>
<p><strong>Now add some style<br />
</strong></p>
<p>It is necessary to add styling to content thus far. CSS excerpt below will give you some idea as to how you can style things. Beware that #adPlayer height property must be set to height of a banner space. Also, some tweaking to .js file will have to be done, but nothing major (this will definitely be changed in future releases).</p>
<pre>/* layout */
#adPlayer { list-style: none; height: 220px; margin-left: 0;
margin-bottom: 0; overflow: hidden; padding: 0; }
#adPlayer li { margin: 0; padding: 0; }
#adPlayerNav { position: relative; top: -1em; right: 1em;
text-align: right; }
#adPlayerNav ul { list-style: none; margin: 0; padding: 0; }
#adPlayerNav li { display: inline; margin: 0 0 0 0.1em;
padding: 0; }
#adPlayerNav li.adPlay, #adPlayerNav li.adPause {
margin-left: 1em; }
#adPlayerNav li a { cursor: pointer; padding: 0 0.5em; }

/* typography */
#adPlayerNav li { font-size: 1.2em; }

/* color */
#adPlayerNav li { border: solid 1px rgb(213, 213, 217); }
#adPlayerNav li a { background-color: white; padding: 0.5em; }</pre>
<p>You now have fully functional banner animator.</p>
<p><strong>Optimization</strong></p>
<p>Loading 3+ 50K+ images in the middle of the page can never be a good thing. Thus, <em>adPlayer</em> library has a <strong>dynamic mode</strong> that can be used. This mode loads images after the page is loaded, which is a good thing. However, you cannot leave your banner space empty until then. A compromise solution is to load first banner in-line and all others after the document is loaded. Your HTML file must now look somewhat like this:</p>
<pre>...
&lt;ul id="adPlayer"&gt;
    &lt;li&gt;&lt;a href=""&gt;&lt;img src="images/ad1.jpg" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id="adPlayerNav"&gt;&lt;/div&gt;
...
&lt;script type="text/javascript" language="javascript"&gt;
    $(document).ready(function() {
        loadPlayer( true );
        adplayer.add ("", "images/ad2.jpg", "");
        adplayer.add ("", "images/ad3.jpg", "");
        adplayer.generatePlayer();
    });
&lt;/script&gt;</pre>
<p>Loading <em>loadPlayer</em> method with <em>true </em>as parameter value will enable <strong>dynamic mode</strong>. Now you can add banners in desired sort order. First parameter is <em>link</em>, second image <em>src </em>and third image <em>alt</em>. After you are done, just call <em>generatePlayer</em> method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/03/banner-animator-v11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom web forms &#8211; Part 2: Importing Form from DXL</title>
		<link>http://www.lotushints.com/2009/03/custom-web-forms-part-2-importing-form-from-dxl/</link>
		<comments>http://www.lotushints.com/2009/03/custom-web-forms-part-2-importing-form-from-dxl/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 08:00:47 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Basic]]></category>
		<category><![CDATA[Custom forms]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[dxl]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[import]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=260</guid>
		<description><![CDATA[In the second part of Custom web forms series I will try to cover import of simple form to Notes database from DXL file. If you wonder how to export a form to DXL, please check Part 1: Exporting Form into DXL. Requirements As mentioned, you will need a DXL file like the result of [...]]]></description>
			<content:encoded><![CDATA[<p>In the second part of <a href="/category/custom-forms/">Custom web forms series</a> I will try to cover import of simple form to Notes database from DXL file. If you wonder how to export a form to DXL, please check <a href="/2009/03/custom-web-forms-part-1-exporting-form-into-dxl/">Part 1: Exporting Form into DXL</a>.<br />
<span id="more-260"></span></p>
<p><strong>Requirements</strong></p>
<p>As mentioned, you will need a DXL file like the result of <a href="/2009/03/custom-web-forms-part-1-exporting-form-into-dxl/">Part 1</a>. Beware that, if you have altered the file and removed the DOCTYPE tag, you will not be able to import DXL and you will either need to add correct DOCTYPE tag back or export the form again.</p>
<p><strong>The code</strong></p>
<p>The code itself is pretty straightforward. You need to open a DXL file as a NotesStream object and then use NotesDXLImporter class to import a DXL to your database. There is a catch. You need to set <strong>DesignImportOption</strong> property of NotesDXLImporter object to create design element. These options are specified in Notes Designer Help.</p>
<pre>Dim session As New NotesSession
Dim dbCurr As NotesDatabase
Dim docForm As NotesDocument
Dim stream As NotesStream
Dim dxlImporter As NotesDXLImporter
Dim strFile As String

Set dbCurr = session.CurrentDatabase
Set stream = session.CreateStream ()

strFile = "c:\download\templateform.xml"
If (Not stream.Open (strFile, "utf-8")) Then
   Exit Sub
End If

Set dxlImporter = session.CreateDXLImporter (stream, dbCurr)
dxlImporter.DesignImportOption =_
DXLIMPORTOPTION_REPLACE_ELSE_CREATE
Call dxlImporter.Process ()</pre>
<p>Just in case you don&#8217;t want to check Notes help for values, here are DXL import options:</p>
<ul>
<li> DXLIMPORTOPTION_CREATE (1)</li>
<li> DXLIMPORTOPTION_IGNORE (2)</li>
<li> DXLIMPORTOPTION_REPLACE_ELSE_IGNORE (5)</li>
<li> DXLIMPORTOPTION_REPLACE_ELSE_CREATE (6)</li>
<li> DXLIMPORTOPTION_UPDATE_ELSE_IGNORE (9)</li>
<li> DXLIMPORTOPTION_UPDATE_ELSE_CREATE (10)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/03/custom-web-forms-part-2-importing-form-from-dxl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom web forms &#8211; Part 1: Exporting Form into DXL</title>
		<link>http://www.lotushints.com/2009/03/custom-web-forms-part-1-exporting-form-into-dxl/</link>
		<comments>http://www.lotushints.com/2009/03/custom-web-forms-part-1-exporting-form-into-dxl/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 08:00:12 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Basic]]></category>
		<category><![CDATA[Custom forms]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[dxl]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[form]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=248</guid>
		<description><![CDATA[The one thing that in my opinion always lacked in Lotus Notes was the ability for users without designer access (and much knowledge of HTML) to build their own custom forms. One might argue that it is not that big of a deal and that it would take an experienced developer approximately one hour to [...]]]></description>
			<content:encoded><![CDATA[<p>The one thing that in my opinion always lacked in Lotus Notes was the ability for users without designer access (and much knowledge of HTML) to build their own custom forms. One might argue that it is not that big of a deal and that it would take an experienced developer approximately one hour to create and test such a form. However, developers usually have more important work to do and this is an hour unnecessary spent.</p>
<p><span id="more-248"></span></p>
<p><strong>How to get around&#8230;</strong></p>
<p>I am positive that different developers would handle this differently. For sure, the easiest thing to do would be to add designer access to a person wishes to create a form. I would advise against it. Not only it creates severe security issue, but it also enables inexperienced user to poke about the database design.</p>
<p>I am positive every designer till now at least heard of DXL. Some of us even used it. I did it for exporting entire database to our internal wiki and to create atom rss for another database. However, most developers, in my experience, look at DXL as a bit of a Notes voodoo.</p>
<p><strong>Let&#8217;s remove this tag!</strong></p>
<p>In several parts, I will try to show how to export and import a simple HTML form that one can use on the web. Also at the very end, I will try to create a form that will enable a user with less than developer access to create a web form.</p>
<p><strong>Onward, to the point &#8211; Exporting Form to DXL<br />
</strong></p>
<p>It is quite simple. You create or already posses a form. For exporting it to DXL, you will need to know it&#8217;s name or you can enable for to be available in Create menu and add a shared action onto it, that will do the work for you. I decided for the later.</p>
<div id="attachment_250" class="wp-caption aligncenter" style="width: 479px"><img class="size-full wp-image-250" title="myform" src="http://www.lotushints.com/wp-content/uploads/2009/03/myform.png" alt="Form with shared action as viewed in Notes client" width="469" height="282" /><p class="wp-caption-text">Form with shared action as viewed in Notes client</p></div>
<p style="text-align: left;">Figure above displays a simple form previewed in Notes client with shared action &#8220;Export form&#8221;in action bar. Upon clicking on this action, a file will be saved on your disk to path c:\download\my_form_name.xml. And below is the code that does all this.</p>
<pre>Sub Click(Source As Button)
   Dim ws As New NotesUIWorkspace
   Dim s As New NotesSession
   Dim db As NotesDatabase
   Dim nc As NotesNoteCollection
   Dim doc As NotesDocument
   Dim docForm As NotesDocument
   Dim stream As NotesStream
   Dim dxlExporter As NotesDXLExporter
   Dim bFound As Boolean
   Dim n As Integer
   Dim strId As String
   Dim strFormName As String

   Set db = s.CurrentDatabase
   Set doc = ws.CurrentDocument.Document
   Set nc = db.CreateNoteCollection (False)
   nc.SelectForms = True
   Call nc.BuildCollection ()

   bFound = False
   strId = nc.GetFirstNoteId ()
   For n = 1 To nc.Count
      Set docForm = db.GetDocumentByID (strId)
      strFormName = docForm.GetFirstItem ("$title").values(0)
      If (doc.Form (0) = strFormName) Then
         bFound = True
         Exit For
      End If
      strId = nc.GetNextNoteId (strId)
   Next

   If (Not bFound) Then Exit Sub

   Set stream = s.CreateStream ()
   Call stream.Open("c:\download\" &amp; strFormName &amp; ".xml","utf-8")
   Call stream.Truncate ()

   Set dxlExporter = s.CreateDXLExporter (docForm, stream)
   Call dxlExporter.Process
   Call stream.Close ()
End Sub</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/03/custom-web-forms-part-1-exporting-form-into-dxl/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Custom user sidebars in web applications</title>
		<link>http://www.lotushints.com/2009/03/custom-user-sidebars-in-web-applications/</link>
		<comments>http://www.lotushints.com/2009/03/custom-user-sidebars-in-web-applications/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 07:00:20 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sidebars]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=217</guid>
		<description><![CDATA[When I was assigned to rebuild company&#8217;s web site for the second time in 7 or 8 years, I have decided that it is probably the time to implement some modularity to the database. First in line were sidebars. Why? Well, despite &#8220;awesome&#8221; notes rich text to HTML rendering, web content was always contained in [...]]]></description>
			<content:encoded><![CDATA[<p>When I was assigned to rebuild <a href="http://www.nil.com">company&#8217;s web site</a> for the second time in 7 or 8 years, I have decided that it is probably the time to implement some modularity to the database. First in line were sidebars. Why? Well, despite &#8220;awesome&#8221; notes rich text to HTML rendering, web content was always contained in rich text field on a document, making it very customizable. On the other hand, sidebars were always subforms that were then connected to the document via a field (user specified subforms name). This was customizable, but regular content editors did not have designer access to the database. Thus, all modifications were relayed to us, developers. And there were quite a bit of modifications. I will pitch you my idea of solution to this problem.</p>
<p><span id="more-217"></span></p>
<p><strong>First step</strong></p>
<p>In order to ensure that content editors could alter sidebars by itself, they had to be moved from design elements to documents. All fine and well. However, if you look at typical sidebar, it is assembled from multiple parts called widgets. This widgets can be e.g. adverts, link boxes, etc. Now, I wanted to achieve as much modularity as I could and there used to be quite a lot of sidebars, containing same widgets (not all, but some). So why force a user to create same thing multiple times? Thus, widgets came to be.</p>
<p><strong>Widgets</strong></p>
<p>Widget (in this case) is the smallest single component that can be displayed in a sidebar. This can be a simple image, or a complex linkbox. Widget in Notes database is a simple document containing descriptive name, short web name and a rich text field. This rich text field contains content for the widget. It can be pure notes content or it can be HTML, that CSS will change into something &#8220;edible&#8221;.</p>
<p>Simple, and easy. However, what you now don&#8217;t want, is for users to link multiple widgets into web content documents. For one, content of sidebars is usually content related, meaning that web pages on same topic will probably have same widgets. And it has to be user friendly if you want users to use it. So, you can&#8217;t expect users to be comfortable with a feature that gives them more work if they decide to change something. And here is where Sidebar documents come in handy.</p>
<p><strong>Sidebar documents</strong></p>
<p>Sidebar document is nothing else but a container of widgets. What I did was enabled user to choose widgets he wants in this sidebar and he/she can sort them however he/she sees it fit. Sidebar document also contains a rich text field that will contain content of specified widgets rich text fields.</p>
<p><strong>Subform</strong></p>
<p>Now, that I had sidebar documents created, there is one thing I could not avoid. I had to create a subform, which I can include on each web form there is. This subform includes a rich text item and some HTML. On the plus side, you now only need one subform for all sidebars.</p>
<p><strong>What does this bring me?</strong></p>
<p>Well, besides the fact that users will now be able to do their own sidebars and have an easy way to change it&#8217;s contents (which means less work for you), this organization also gives you one powerful feature. All computed values and hide formulas that you will specify in widgets will be recalculated once they are displayed as part of the document and displayed on web. Thus, you can i.e. add a computed value that computes from a field on web page form and will compute correctly when displayed on web page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/03/custom-user-sidebars-in-web-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling Java classes from LotusScript</title>
		<link>http://www.lotushints.com/2009/02/calling-java-classes-from-lotusscript/</link>
		<comments>http://www.lotushints.com/2009/02/calling-java-classes-from-lotusscript/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 08:00:19 +0000</pubDate>
		<dc:creator>Vladimir Kocjancic</dc:creator>
				<category><![CDATA[Best practices]]></category>
		<category><![CDATA[Code optimization]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Object-oriented development]]></category>
		<category><![CDATA[adapter]]></category>
		<category><![CDATA[custom classes]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[LotusScript]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[object-oriented]]></category>
		<category><![CDATA[user registration]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.lotushints.com/?p=210</guid>
		<description><![CDATA[Have you ever wondered how you could call already written and quite useful Java classes in your LotusScript code? To me, this moment was, when I was trying to implement other department&#8217;s code into my own. Unfortunately I wasn&#8217;t skilled enough in ways of object development, LS2J  and googling back then to actually figure out [...]]]></description>
			<content:encoded><![CDATA[<p><span>Have you ever wondered how you could call already written and quite useful Java classes in your <span>LotusScript</span> code? To me, this moment was, when I was trying to implement other department&#8217;s code into my own. Unfortunately I wasn&#8217;t skilled enough in ways of object development, LS2J  and googling back then to actually figure out that was possible. I remember thinking: &#8220;IBM implemented Java in Lotus Notes, they must have done some adaptor for it.&#8221;, but was unable to figure it out. Until couple of years back, when I got a </span><a href="http://www.randsinrepose.com/archives/2002/07/10/the_dark_underbelly_of_holy_shit.html">Holy shit!</a> moment, finding <a href="http://www.nsftools.com/blog/blog-11-2004#11-19-04">this blog post</a>.</p>
<p><span id="more-210"></span><strong>But why would I need that?</strong></p>
<p><span>As you can see from the above examples, you can implement Java functionality to your <span>LotusScript</span> code. This can be good if your Java programming skills aren&#8217;t that great or you already have some code in <span>LotusScript</span> and you wish to add functionality. For me, it would do fine in cases where I converted documents in a database to PDF on user request, or when I needed an agent to <span>login</span> user to notes via web in the background, or as I mentioned, when I needed to implement some functionality from other department in my already existing code. Instead, I re-wrote several agents into Java, which in the end didn&#8217;t prove to be that bad of a decision, but about that some other day.</span></p>
<p><strong>But how do I do that?</strong></p>
<p>There is a functionality called <strong>LS2J </strong><span>that does exactly that for you. If you will, you can imagine it as an adaptor for <span>LotusScript</span> that allows you to call Java classes. I will give you a small example. It is based on my user <span>login</span> class, although, there is really no code there to log in the user.</span></p>
<p><span>First you need to create/obtain a java library that does what you want. I named that library <span>jclass</span>:<span>UserLogin</span>.</span></p>
<pre><span>public class CUserLogin {
   String m_strUsername;
   String m_strPassword;

   public void Initialize(String strUsername, String strPassword) {
      if ((strUsername.length() == 0) ||
          (strPassword.length() == 0))
         return;

      m_strUsername = strUsername;
      m_strPassword = strPassword;
   }

   public boolean run() {
      // add code that will perform auto-login
      return true;
   }
}</span></pre>
<p><span>Then, I strongly suggest you create a <span>LotusScript</span> library, containing a class that will do actual Java to <span>LotusScript</span> conversion. Why? So you have to do it only once.</span><br />
My script library called class:UserLogin is depicted below.</p>
<pre><span><span>Uselsx</span> "*<span>javacon</span>"</span>
<span>Use "<span>jclass</span>:<span>UserLogin</span>"</span>

<span>Class <span>CUserLogin</span></span>
<span>	<span>loginObj</span> As <span>JavaObject</span></span>

<span>	Sub New (<span>strUsername</span> As String, <span>strPassword</span> As String)</span>
		Dim js As New JAVASESSION
<span>		Dim <span>loginClass</span> As JAVACLASS</span>

<span>		Set <span>loginClass</span> = <span>js</span>.<span>GetClass</span> ("<span>CUserLogin</span>")</span>
<span>		Set <span>loginObj</span> = <span>loginClass</span>.<span>CreateObject</span> ()</span>

<span>		Call <span>loginObj</span>.Initialize (<span>strUsername</span>, <span>strPassword</span>)</span>
	End Sub

	Function run() As Boolean
<span>		run = <span>loginObj</span>.run()</span>
	End Function
End Class</pre>
<p><span>And that is it. Now all you have to do, is use this script library in your code. Where you need it. I created a simple agent that will pop-up a window with text depicting <span>login</span> success.</span></p>
<pre><span>Use "class:<span>UserLogin</span>"</span>

Sub Initialize
<span>	Dim <span>userLogin</span> As <span>CUserLogin</span></span>

<span>	Set <span>userLogin</span> = New <span>CUserLogin</span> ("test", "test123")</span>
	If (userLogin.run()) Then
<span>		<span>Messagebox</span> "<span>Login</span> succeeded"</span>
	Else
<span>		<span>Messagebox</span> "<span>Login</span> failed!"</span>
	End If
End Sub</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.lotushints.com/2009/02/calling-java-classes-from-lotusscript/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

