PermaLink My XPage samples and beta 2 - some bug workarounds09/14/2008 08:06 AM
Domino 8.5 - XPages
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 the NotesDocument class representing the current document you need to use "doc=document.getDocument();" method.  For example, you would use this method to get a copy of the document when creating a response document for the current document.  With beta 2 the document was discarded after the save occurred and therefore calling this method produced an error.
- The workaround: use this to get a handle on the NotesDocument for the current document "doc=db.getDocumentByID(document.getNoteID());"

Generating dynamic controls for a document collection and binding each document to a panel.
- What was happening was the Save Data Sources simple action was failing.  This is a great feature in that it will save all bound documents that are on the page, instead of having individual save buttons.  You can also call this method in server side script by calling the Global function  "save();".
- The solution is to have the panel document binding computed on Page Load instead of Dynamically

Image:John's Blog - My XPage samples and beta 2 - some bug workarounds

If you click on the Source tab for your XPage, you can change this manually by changing the "#" to a "$" for your script bindings to the document IDs:

Image:John's Blog - My XPage samples and beta 2 - some bug workarounds

I was told that both of these issues are fixed for the GA build, so my previous examples should work without any changes when the product goes gold.

John

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

1. Jonas12/04/2008 07:18:53 AM


Hi,
Trying out the file upload control in beta 2 and it fails due to no value in DocUNID field ie no value set in parentUNID in the other database resulting in no controls showing up when pressingbutton.




2. Jonas12/08/2008 03:26:30 AM


Thanks for mail answer. Error occurred when setting up databases in subfolders even if coding paths to folders. If moving to Root everything works fine

/J




Search
Hire the Experts
Need help on your XPages projects?

Talk to the experts! Read more...
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