2

I have a custom control that create a new document through ext-lib dialog box that work fine. However when the action is performed the second time it edit the document instead of creating a new document. The datasource is set to create document.

2
  • Bob, did my answer help you? Aug 8, 2013 at 16:47
  • Bob, if my answer helped please feel free to mark this question as answered. Aug 20, 2013 at 17:04

1 Answer 1

3

I had to do two things with the 2nd datasource. First was to set ignoreRequestParams to true and then set the scope to request. These are both in the properties of the data.

<xp:dominoDocument var="document2" formName="software" ignoreRequestParams="true" scope="request"> </xp:dominoDocument>

I had a dialog that brings up a form with a view and unless I changed the scope to "request" I would be adding/editing multiple documents at the same time.

Here is some data on scoped variables http://www-10.lotus.com/ldd/ddwiki.nsf/dx/xpages-scoped-variables.htm My problem was the item was staying in memory too long.

I asked a similar question xPage with multiple datasources has the second datasource always opened in edit mode

2
  • 1
    It might help to include sample code, demonstrating scope="request", since one only gets access to that by delving into the data properties under all properties, rather than via the setup of the data sources on the properties tab of the XPage or custom control. Aug 7, 2013 at 15:32
  • this is a very common question. Patrick does have the right answer - set the document source to requestScope so it's not retained longer then necessary. Aug 10, 2013 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.