<?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; dxl</title>
	<atom:link href="http://www.lotushints.com/tag/dxl/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>Wed, 14 Jul 2010 06:00:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<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 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>
	</channel>
</rss>
