PermaLink XPages Example part 2: Generating dynamic editable fields for a document collection06/16/2008 03:50 AM
Domino 8.5 - XPages
* please note: There are a few issues with Beta 2 that prevent this example from working properly.  Refer to this blog entry for workarounds.

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 address this issue.

In the previous example I demonstrated how XPages allows you to bind your controls on the page to multiple datasources.  In this example I take it up a notch by showing how you can repeat a panel control that is bound to a document multiple times, thereby binding edit controls to a collection of Notes documents.  XPages maintains the binding so that all the documents are updated from a single button with a single simple action "Save Datasources".

Here's the use case: When a Customer Order is created there could be multiple items the customer is ordering.  We should give the user the ability to add new items dynamically by clicking a button.  The button will create a new response document and then reload the page.  The repeat control will generate the following editable fields for all the response documents: Item Number, Price, and Quantity.

Here is a screen shot:
Image:John's Blog - XPages Example part 2: Generating dynamic editable fields for a document collection

Here are the downloads:
- CustomerOrders.nsf
- step-by-step powerpoint

Download the application and try it out.  Contact me if you have any questions via posting or email.  My contact information is in the powerpoint.

John

Technorati:
This page has been accessed 1080 times. .
Comments :v

1. Vidyasagar07/18/2008 01:43:34 AM


Nice one. Its working fine. But is there a way to add an X page in the repeat control and get the same functionality?




2. John Mackey07/18/2008 04:35:50 AM


Vidyasagar, you can add a custom control in a repeat control. A custom control is basically an XPage itself, similar to a subform in Domino.

The multi-file upload sample is an example of this. Take a look at this post: { Link }




Search
XPage Examples
By Category
My Links
Downloads
Monthly Archive
Powered by
Blogsphere
Lotus Domino ND7 RSS News Feed RSS Comments Feed Geo URL netcraft RSS Validator Lotus Geek Chris. A. Brandlehner OpenNTF BlogSphere
Calendar
No calendar found.
The BlogRoll