Mike Jackson
Mike Jackson

Reputation: 427

Why does my xpage create a duplicate document each time it's edited and saved?

I have an Xpage with a custom control that has a tabbed control on it. When I edit the first tab and save it. I duplicate document shows up in the view. As far as I can tell the duplicate document is identical to the original, including the saved changes. Why is this happening? The onclick event of the Save button does an Open Page with a target action of Edit Document.

Any suggestions would be appreciated.

MJ

Upvotes: 0

Views: 131

Answers (2)

Paul Stephen Withers
Paul Stephen Withers

Reputation: 15729

If the button type is Submit that saves all datasources on the page. My advice would be to never use that type of button. You rarely want to save all datasources, even those a future developer may add. You usually want to save a specific datasource. So use the relevant method (e.g. document1.save()) to do so on a button of type Button. This will stand you in better stead going forward.

Upvotes: 1

user618792
user618792

Reputation:

I think you may have multiple datasources on your page. Have you checked out this question?

Possible Duplicate

Upvotes: 0

Related Questions