| Latest 7 Posts |
I'll be speaking at Lotusphere 09 on....XPages of course Tue, Nov 11th 2008 60
|
IBM bumps Microsoft from second place on brand-value list Fri, Sep 19th 2008 96
|
My XPage samples and beta 2 - some bug workarounds Sun, Sep 14th 2008 104
|
Lotus Notes 8.5 beta 2: Want applause at your next demo? Use this new beta 2 feature... Sun, Aug 31st 2008 305
|
Lotus Notes 8.5 beta 2 - new Design Preview for XPages Fri, Aug 29th 2008 116
|
Yellow Day tip: how to use Notes computeWithForm with an XPage Mon, Aug 11th 2008 53
|
XPages: Techniques for using Client-Side Javascript with Server-Side Javascript Wed, Jul 16th 2008 104
|
| Top
10 |
Lotus Notes 8.5 beta 2: Want applause at your next demo? Use this new beta 2 feature... Sun, Aug 31st 2008 305
|
xPages Example: utilizing the built-in AJAX features Sun, Jun 22nd 2008 219
|
xPages Example: updating data from multiple forms from a single xPage Mon, Jun 9th 2008 153
|
XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage that stores all attachments in an external repository db Sun, Jun 29th 2008 145
|
xPages Example part 2: Generating dynamic editable fields for a document collection Mon, Jun 16th 2008 132
|
Lotus Notes 8.5 beta 2 - new Design Preview for XPages Fri, Aug 29th 2008 116
|
XPages: Techniques for using Client-Side Javascript with Server-Side Javascript Wed, Jul 16th 2008 104
|
My XPage samples and beta 2 - some bug workarounds Sun, Sep 14th 2008 104
|
IBM bumps Microsoft from second place on brand-value list Fri, Sep 19th 2008 96
|
XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 1 Mon, Jul 7th 2008 85
|
|
|
XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage that stores all attachments in an external repository db Jun 29, 2008 8:17a |
| Hits |
150 |
| Link Love |
http://planetlotus.org/2a38af |
| Category |
|
| Keywords |
document
domino
formula
javascript
xpages application
bug
database
interface
|
| Author |
groupwareinc |
Below is an example of how to build a multi file upload Custom Control that uses a central attachment repository db for all the attachments. The application has very little code and utilizes the Repeat control and Panel control to generate an unlimited amount of uploads per XPage. (Actually, I am sure there is a limit but I have not hit it yet.) The step by step instructions are below. You can also download the example database(s) by clicking here: XPageCustomControl.zip
Overview:
XPage Custom Controls allow you to build your own controls for reuse. They show up in control palette and can be dragged and dropped on any page just like any of the other controls. The concept is similar to a subform in Domino.
I was demoing XPages to a group of colleagues the other day. I was showing an example of the repeat control, which allows you to repeat a group of other controls based on a formula or value. The neat thing about the Repeat control is it can dynamically creates controls at runtime. One of the the guys asked about using the control to generate unlimited file upload controls for storage in central repository database. I thought... wow, that is a great use case for an example (thanks Mark). It was very quick to build too.
Let's start out with a look at the completed custom control:
After dropping it on an XPage, here is a screen shot of the control in use. You can see that 3 files have been uploaded already and the user clicked the "Add New Upload" button a 4th time and is presented with a blank upload control plus a description field:
The "Add New Upload" button creates a new document in the FileUploadDB database with a reference to the current document's doc ID. The page is then reloaded and the repeat control creates a new blank upload control bound to the new document. A simple JavaScript save() uploads the attachment.
You can drop this control anywhere on your page(s). The only additional item that is needed on your page is a field calculating the document's docUNID (2nd to last screen shot below).
Here are the steps to build the control:
In your database, under Database Navigator select "Custom Controls" then click "New Custom Control". Provide a name for the control.
Drag and drop a Button control on the page and for the label enter "Add New Upload". Select the Event tab and provide the following formula for the onclick() event. This will create a new attachment document in the repository and reload the page:
*note: for this example the attachment repository is named "FileUploadDB.nsf" in the Domino root directory
Next drag a Repeat control to the canvas. Select JavaScript for the Iteration and enter the following for the formula. This formula looks up the associated attachments and generates an array of docIDs based on the document collection:
Enter the following for the Repeat control options. The "docid" variable will contain the docUNID for each document:
*note: I do limit the amount of uploads to 30. I think that's enough...
Next drop a Panel control into the Repeat control. Set the Datasource as follows:
Set the Document Id to be computed. The Document ID will be the "docid" variable from the Repeat control:
There is one property we do have to set that is not obvious if you are starting out with XPages and Panels. That is to: "ignoreRequestParams". The reason for this is we are setting the Document ID and default Action for the Panel ourselves and do not want the Panel to pick up these parameters from the request. Here is a screen shot of how to set that parameter:
Drop a "Table control" to the Panel, 1 row by 2 columns. Now we need to add our controls to the Table. Add an "Edit Box", "File Upload" and "File Download". Here's a screen shot of the bindings for the controls:
Description Edit Box Control:
FileUpload Control and FileDownload Control both have the same bindings:
For the FileUpload control we want to hide the control after one file has been uploaded. We only want one attachment per repository document. Here is a screen shot of the Visibility formula and where you would set that:
Set the opposite logic for the FileDownload control, that is return false if there are 0 attachments.
Place a Button control in the second column labeled "Upload". Set the same visibilty formula as the FileUpload control. It has a very simple formula which saves all data sources. You could substitute a simple action here if you prefer:
On the form where you will use the new MultiUpload control, I use the universalID for the link between the document and the attachment. I placed a hidden Edit Box control on the page with the following Default value formula:
Lastly, here is the Attachment form in the FileuploadDB.nsf repository. I have a view sorted by ParentUNID named "vAttachmentLkUp":
That's it! It really is very minimal the amount of work involved. It took less than an hour for me to do. I am sure the interface could use a little bit more work, but I think it makes for a great example.
The one issue I had seemed to be a bug where I could not place the FileUpload control as the first control in the Panel. I ended up putting the Description first and that seemed to fix the issue...very odd issue. I posted the problem to the 8.5 Beta forum.
Download it and try it out. Hopefully seeing these techniques solving a real business need will start you thinking about other uses for this technology. Let me know if you have any questions....
John
|
| Blog Posts |
60

|
I'll be speaking at Lotusphere 09 on....XPages of course 
Tue, Nov 11th 2008 6:27a John Mackey Here's my abstract:
Deep Dive Into Building An IBM Lotus Domino Application Powered By XPages
An unlimited number of editable documents on the same page? Generating the type of controls for fields on page load? Dynamic applications have always been a challenge for Lotus Domino development. Not anymore! In this session learn how to utilize the power of XPages to build a survey tool that can have an unlimited number of questions. I’ll show you how to dynamically allow for the select [read] Keywords: domino
ibm
lotus
lotusphere
xpages application
applications
development
|
96
 2 |
IBM bumps Microsoft from second place on brand-value list 
Fri, Sep 19th 2008 12:11p John Mackey IBM has moved past Microsoft to claim the title of second most valuable brand in the world, according to the annual Global Brand List.
http://www.bizjournals.com/triangle/stories/2008/09/15/daily41.html [read] Keywords: ibm
microsoft
|
104
 1 |
My XPage samples and beta 2 - some bug workarounds 
Sun, Sep 14th 2008 11:51a John Mackey I received a number of emails from folks who were having issues with some samples on my site and DDE 8.5 beta 2. I worked with the IBM developers this past week on solving the issues and finding workarounds. Thanks to Phil Riand and Paul Hannan for working with me on these issues, I now have the below solutions.
There were 2 issues:
Getting a handle on the backend document that represents the current document for the page.
- when submitting a document, in order to gain full access to [read] Keywords: document
ibm
bug
server
|
305

|
Lotus Notes 8.5 beta 2: Want applause at your next demo? Use this new beta 2 feature... 
Sun, Aug 31st 2008 12:52p John Mackey Demoing the new XPages Select Controls Dialog Box will guarantee applause at your next demo. This dialog provides you the ability to drag all your Notes data fields from the data palette and select the type of control and label for each field. It then does the following for you:
- creates a table with 2 columns and rows for each field
- creates labels for each field
- creates the appropriate control
- binds the control to the data field
- additionally, it can even add a submit button a [read] Keywords: lotus
notes
xpages |
116

|
Lotus Notes 8.5 beta 2 - new Design Preview for XPages 
Fri, Aug 29th 2008 4:31p John Mackey Lotus Notes 8.5 beta 2 was released today. Here's a link to the beta 2 download info:
http://www-10.lotus.com/ldd/nd85forum.nsf/DateAllThreadedWeb/2af77f70817fab8d852574b40061d30f?OpenDocument
For those of you who have been wanting to try out XPages, but did not want to setup a Domino server...Good news! Beta 2 provides design preview functionality for XPages.
Here's a screen shot: [read] Keywords: domino
ldd
lotus
notes
xpages server
|
53

|
Yellow Day tip: how to use Notes computeWithForm with an XPage 
Mon, Aug 11th 2008 9:47a John Mackey I'm celebrating Yellow Day today here at GroupwareInc. In honor of the celebration I have an XPages tip to share with you.
How to use Notes computeWithForm with an XPage
Here's how you can use your Lotus Notes default field formulas when opening up an XPage, or when saving an XPage, or both.
- Select your XPage Properties tab and click on the All Properties tab.
- Navigate to data and expand
data->dominoDocument[0].
- Select when to execute the computeWithForm f [read] Keywords: document
lotus
notes
xpages properties
|
104

|
XPages: Techniques for using Client-Side Javascript with Server-Side Javascript 
Wed, Jul 16th 2008 9:23a John Mackey XPages provides techniques that you can utilize between client-side and server-side Javascript. I have a couple of examples below that show how you can stop server-side events from firing from a client script and also how you can retrieve values for use in client-side script using inline server-side script in your client js.
Events
Each event for a component can have both client-side and server-side Javascript. When the event is fired the client-side script is executed first. You can prev [read] Keywords: designer
document
domino
ibm
javascript
lotus
notes
xpages server
|
65

|
XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 2 
Mon, Jul 7th 2008 7:28a John Mackey This is Part 2 of this example. Click here to [read] Keywords: javascript
xpages java
server
sql
|
85

|
XPages Example: Calling Java Methods directly from server side JavaScript - performing an SQL query Part 1 
Mon, Jul 7th 2008 7:07a John Mackey I have been reading many of the discussions this week concerning Java [read] Keywords: javascript
xpages java
server
sql
|
145

|
XPages Example: Building a Custom Control - How to build a Custom Multi-FileUpload Control that you can drop on any XPage that stores all attachments in an external repository db 
Sun, Jun 29th 2008 1:03p John Mackey Below is an example of how to build a multi file upload Custom Control that uses a central attachment repository db for all the attachments. The application has very little code and utilizes the Repeat control and Panel control to generate an unlimited amount of uploads per XPage. (Actually, I am sure there is a limit but I have not hit it yet.) The step by step instructions are below. You can also download the example database(s) by clicking here: XPageCustomControl.zip
Overview:
XPag [read] Keywords: document
domino
formula
javascript
xpages application
bug
database
interface
|
219

|
xPages Example: utilizing the built-in AJAX features 
Sun, Jun 22nd 2008 12:26p John Mackey You can take advantage of AJAX while developing web 2.0 applications with xPages. There are 2 features that provide built-in AJAX support.
These are:
Ajax Type Ahead
Partial Page Refresh
Below I will walk you through step-by-step on how to implement these features in an application. You can also download a sample database by clicking here: xPageAjaxExample.nsf
Ajax Type Ahead
The Ajax type ahead feature can be added to any edit box control. It allows you to provide a list of val [read] Keywords: dblookup
domino
formula
xpages ajax
application
applications
database
dojo
server
web 2.0
|
132

|
xPages Example part 2: Generating dynamic editable fields for a document collection 
Mon, Jun 16th 2008 7:06a John Mackey I built on the previous xPage example, the Customer Orders application, to demonstrate how to generate dynamic fields from a document collection. There is a sample database for you to download as well as a powerpoint presentation that explains the steps involved.
Over the years I have developed different techniques to handle dynamic fields in Domino applications. I'm sure many of you have also tackled this issue in various ways. In xPages there are built in controls that you can utilize to [read] Keywords: document
domino
notes
xpages application
applications
database
email
|
153

|
xPages Example: updating data from multiple forms from a single xPage 
Mon, Jun 9th 2008 2:07p John Mackey I put together an example of using xPages to update data from multiple forms on a single xPage. There is a sample database for you to download as well as a presentation that walks you through the steps involved.
xPages separates the presentation layer from the data layer. This is obviously very different to the one to one relationship in Domino. xPages also allows the developer to bind to multiple datasources from a single page. This feature can really provide a different approach to dev [read] Keywords: domino
forms
symphony
xpages application
applications
database
email
|
14

|
Lotus Designer 8.5 Beta 1 release 
Sun, Jun 1st 2008 10:54a John Mackey As a Lotus Domino 8.5 design partner, I have been working with the 8.5 pre-beta releases for several months. The public beta version 1 was released last Friday. There are many enhancements, the largest being within the Designer and the move to eclipse and the inclusion of xPages. With a background in Lotus Notes and Websphere Portal I am particularly interested in xPages since the technology is derived from the Lotus Component Designer.
Here is a good description of the new xPages techno [read] Keywords: composite
designer
domino
ibm
javascript
lotus
notes
xpages ajax
applications
css
eclipse
java
server
web 2.0
websphere
websphere portal
wiki
|
You can rent this space for 30 days. Interested?
|
9

|
Domino 8 beta 2 - composite applications and eclipse components 
Mon, May 7th 2007 9:09a John Mackey I've been working with the beta 2 release of Domino 8. In particular I've been working on composite applications, eclipse components, and eclipse plugins. The product has been very stable.
I've found some good resources for the work I've been doing. Here's a collection of links that I found helpful:
New redbook draft that has a chapter on Lotus Notes: Building Composite Applications
Two simple tutorials to build NSF based apps with NSF and Eclipse components
Excellent article by Brian [read] Keywords: composite
domino
ibm
ldd
lotus
notes
application
applications
eclipse
|
6

|
Lotus Component Designer - enhancing the sample discussion component 
Sat, Mar 31st 2007 11:16a John Mackey I needed to enhance the sample discussion component that ships with LCD 6 to have similar features as the discussion portlet that shipped with Workplace Services Express. Many customers are upgrading to Portal 6 from WSE and one of the widely used features was Team spaces. Users are able to create a team space for their teams/projects and WSE would create a new composite page with instances of these portlets. The more popular portlets are the discussion, team calendar, and document manager p [read] Keywords: composite
designer
document
document manager
ldd
lotus
applications
database
portlet
|
6

|
Sametime and multiple ldaps 
Fri, Mar 23rd 2007 9:54a John Mackey I've been busy with a Websphere Portal cluster installation the last couple of weeks. The interesting piece to this project was using multiple disparate ldaps. We used both Tivoli Directory server and Microsoft Active Directory. Though the Portal 6 documentation supports this configuration we found there were many twists to integrating applications and products. One in particular was Sametime 7.5.
With Sametime, we setup Lotus Domino to use Directory Assistance to authenticate users via [read] Keywords: domino
lotus
sametime
applications
microsoft
server
tivoli
websphere
websphere portal
|
7

|
Formatting dates in Lotus Component Designer 
Thu, Feb 22nd 2007 10:39a John Mackey Ok, this is not the most exciting topic to write about. The formatting of dates in LCD has just come up a number of times over the past week with a number of different developers. So I figure there are many other people with the same issue.
Each developer has tried various techniques without success and left it to come back to later. The issue seems to be that the date/time value is stored or translated into the "International" format within XML. When using an Edit Box control or Date T [read] Keywords: designer
formula
javascript
lotus
properties
xml
|
10

|
Portlet Factory - exporting data to Excel 
Fri, Feb 9th 2007 11:00p John Mackey I was recently working on exporting data from a Websphere Portlet Factory application to Excel. Portlet factory has an "Excel Export" builder that makes exporting data from a service provider easy.
The twist here is that the user also wants to have the data match exactly with the various sort options selected from a view. These were based on the column headings they have clicked on. I also provide the user with a query interface to allow them to drill down on the data. This needed to be [read] Keywords: application
interface
java
portlet
sql
websphere
|
7

|
Lotus Component Designer - binding to multiple datasources 
Sun, Jan 28th 2007 11:00p John Mackey I'm home now in Pennsylvania. I miss the warmer weather already. It's 15 degrees here. My presentation went well and I enjoyed it. I participated in the Gurupalooza afterwards. It was alot of fun to be a part of.
I worked on the plane on a Lotus Component Designer technique for updating multiple documents within a single document. I demoed a similar technique in my lotusphere session by using XML child elements within a document. The issue here is how to do the same thing except with a [read] Keywords: designer
document
lotus
lotusphere
portlet
properties
xml
|
6

|
Lotusphere 2007 - Day 3 
Tue, Jan 23rd 2007 11:00p John Mackey I've attended some great sessions so far. I had an opportunity to meet the Lotus Component Designer team in last night's Birds of Feather session. That's what I like about Lotusphere, where else would you have an opportunity to meet the development team? I've been on conference calls with most of these folks but to meet them in person is much different. Plus it's a very casual environment, more or less sharing their ideas with us and us with them. Really a great group of people too....
I [read] Keywords: collaboration
composite
designer
document
document manager
ibm
lotus
lotusphere
ajax
applications
consulting
db2
desktop
development
dojo
interface
microsoft
podcast
portlet
server
web 2.0
websphere
websphere portal
|
6

|
Lotusphere 2007 
Sun, Jan 21st 2007 11:00p John Mackey What a great opening session for Lotusphere 2007! The band really added to the mood. There seems to be an underlying buzz here that I haven't felt in years. The new products and releases are all revolutionary and evolutionary: Lotus Notes and Domino 8, Quickr, Lotus Connections, Lotus Component Designer, Portal Express V6, Sametime 7.5.1.
This is the first time I am attending as a speaker. My session is "BP307 - Lotus Component Designer - Building an Employee Application System" is on Thu [read] Keywords: connections
designer
domino
lotus
lotusphere
notes
quickr
sametime
application
portlet
profile
|
|