0
votes

based on these questions:

xpages UNID of documents / why it is changing

xpages why my field value isn't copied correctly

i noticed, unfortunately, some computed field which stores the UNID is changing if I hit refresh / F5.

my XPage has defined one datasource ( Cdoc ) and it contains a button which shows a dialog. this dialog has defined other datasource ( Pdoc ). The dialog contains several fields, which inherit some values from Cdoc...

Should I use ignorerequestParams property for one of these datasources? Can you explain the meaning of this property?

What happens:

The field which stores the UNID of the Cdoc after I show the dialog and create some Pdoc and list it in a viewPanel inside the XPage ( Cdoc datasource ) and then hit F5 the Cdoc UNID is changing ... even if it is computed.

Also, if the doc. isNewNote() the url is something like this:

server/Test.nsf/doc.xsp?action=newDocument 

even after I call Cdoc.save(). I think this could be a reason why the computedField which stores the UNID is changing when I hit refresh => a newDoc is created.

Meanwhile, I put the ignoreRequestParams set to true just for the dialog ( Pdoc ).

Thanks for your time!

1

1 Answers

2
votes

By default, the UNID and action (open, create, edit) are defined by the URL query string, i.e. the request parameters. With requestParamPrefix you can define which entry in the query string is used to find the document parameters for this datasource. By default that's documentId. But if you want to manage the UNID and action yourself through code, that's when you need to set ignoreRequestParams="true".

If you have two datasources on a page, you will need to use either ignoreRequestParams or requestParamPrefix on one of them. If not, you're editing the same document in both datasources.