Skip to main content link. Accesskey S

The useful resource for IBM Lotus Domino XPages development

Submit Search

Home > Server JavaScript > Work with documents and fields on the XPage
is maintained by 
Julian Buss.
and hosted by
Julian Buss
Created by Anonymous on 22.05.2009 00:10:44

Thank you, very useful :)

Created by Anonymous on 26.01.2010 21:29:06

Could I suggest adding to the "Client JS" paragraph of the "Get and set a field on the XPage" section the use of


to access a Computed Field's value.

Thank you for a wonderful XPages resource. Jerry Shelley.

Created by Anonymous on 25.03.2010 11:07:28

I created a standard control for all addresses (street, town, country and so on)

I want now use it into various Xpages working on various type of documents (customer, persons, commands, projects) needing an address.

How can I bind the document fields (they may have a different name from those of the control) and the fields of the control ?

I try to add compositeData to the control giving the names of the document source fields. But it doesn't work.

As the control is embedded into different Xpages, I want to be sure that the document binded in the control is the same one binded in the xpages (the submit button is in the xpage)

If I get the notes document twice (once in the control and other in the xpage) , I guess I will get update conflicts, no ?

And, if its possible this way, how can I give the good name fields to the control ?

Thanks for response if there is...

Pierre Frappé

Created by Julian Buss on 11.04.2010 20:28:53

one possiblity is to use the "currentDocument" data source, it's always there and points to the current document data source.

If you have more than one document data source on your xpage, you can throw it into a scope variable and get it back from the scope in your custom control.

Created by Anonymous on 09.09.2010 20:52:58

I've just been bitten by overuse of getComponent().

I was running an SQL Query in a Hidden Input field, and then accessing the results in several Computed Fields. But every getComponent causes a re-execution of the code in the Hidden Input field! No wonder my page was taking ages to load.

I'm sure this is documented elsewhere, but I can't quite find it at the mo.

Hope this helps someone not make the same misktakes as me. Jerry Shelley.

Created by Anonymous on 16.11.2010 12:18:22

I simply used :


and seems working to put current page document in edit mode.

Possible parameters are: edit, readOnly, autoEdit, toggle.


Created by Julian Buss on 29.11.2010 11:40:22

thanks, I added that!

Created by vijayasree on 28.03.2011 10:54:37

Thank you very much this helps me alot

Created by Andreas on 03.04.2011 14:16:46

THX for nice post. One question.

Can i load an additional document in a xpages from another database and work with this field to add some additional information ?

Created by Bunk on 31.05.2011 09:33:36

This's very nice post

Created by Terry on 15.06.2011 00:26:35

I've tried the 'Define dynamic value binding for a field at development time in the XML source' inside a repeat control containing a Edit Box. What I find is the control renders in a instead of an tag when the value computes the item name.

So if the formula is value="#{dominoDoc['field1']}", the HTML displays an element. However, if the formula is value="#{dominoDoc['field'+rID]}" where rID is a string element, the HTML displays in a tag.

I have tried many variations on this form, and nothing seems to work. Am I being dense? or is this a problem?

Created by Hitesh Basera on 05.08.2011 18:59:32

Thanks a greaqt help...

Created by Arunthathi on 13.03.2012 13:13:33

I want to replace the images in view while editing that document.

Created by vijayasree on 02.04.2012 09:39:42

Can you provide the java script code for ui document collection

Created by padma priya on 20.04.2012 04:05:20

thankyou:) very useful

Created by Ronaldo M. Martinez on 05.06.2013 11:37:54

Nicely done.

Thanks. :)

Created by Bill Fox on 26.09.2013 00:54:18

Not sure I understand the Access Notes Back end section. If I read it correctly var doc:NotesDocument = datasourcename.getDocument(true); refreshed the backend document with any changes that were made to the datasource, but it seems that is what happens with var doc:NotesDocument = datasourcename.getDocument();

I have made some changes to the doc and I need to refresh the datasource with them. IS that what the var doc:NotesDocument = datasourcename.getDocument(true); really does?

Created by 83.70x33 on 19.02.2014 08:57:45

Created by Edwin De La Cruz (edwinspire) on 08.01.2015 23:31:28

Warm greetings from Ecuador .

My name is Edwin , currently working on a software development company where the migrating some older applications written in lotus to XPage . XPage liked, but I had some problems and ad server has me very helpful , thank you for your time to write these tutorials.

I would like to make contact later , I have many doubts that insurance could help me .

Happy 2015 soon.