This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 5, 2014, 5:51 AM
5 Posts

request on response documents

  • Category: Debugging
  • Platform: Windows
  • Release: 8.5.3
  • Role: Developer
  • Tags:
  • Replies: 3

In my xpage it has two datasources, One is for main document and another is for to create response documents and display it on main document using viewpanel.

Q1) while im creating new main document  and with out saving it , can i create response document or not.. becoz some fileds of main document is required to create responses.

And my scenario/issue is..

while im creating response document and before that  im not saving main document.. then while saving response document, main document is also getting saved.

Even im check with ignoreRequestParams properties and all

 

May 6, 2014, 2:49 AM
366 Posts
The "parent" document has to be saved.

the link between the parent document and the response is the parent documents unique id.

May 7, 2014, 12:00 PM
586 Posts
hmmm

Maybe it's just me... but I see very little benefit to using actual response documents in the XPages world.  

 

Sure In SSJS you can use the doc.responses property which is nice...  but if both related documents were main documents with a shared key it's not that difficult/expensive to get them other ways.

Also remember there's less needs to duplicate data between parent doc / child doc as you can now do more live lookups inside views and repeat controls and stuff.  

 

Just a couple comments I guess.

Dave

May 9, 2014, 12:44 AM
453 Posts
I really don't like response documents

There are several problems that I have run into. First if there is a save/rep conflict when it is resolved the the UNID may be changed. Second you don't have access to the real UNID until after the new document is saved. Which in your case it would appear to be to late.

Plus in XPages the repeat control can do everything that you want to do with a response document. Plus I have created three/four level deep 'response' with each level having it's own @Unique value, but I also keep all the interveening values so that the fourth level down knows it's top level parent. There might be a slight improvement by finding a document by UNID versus a getDocumentByKey in a view but I think it would be pretty near impossible to measure.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal