if
(pageContext.getParameter(
"saveBtn"
) !=
null
) {
OAException descMesg =
new
OAException(
"FND"
,
"FND_CUSTM_SAVE_CHANGES"
);
OAException instrMesg =
new
OAException(
"FND"
,
"FND_CUSTM_SAVE_CHANGES"
);
OADialogPage dialogPage =
new
OADialogPage(OAException.WARNING, descMesg, instrMesg,
""
,
""
);
dialogPage.setOkButtonToPost(
true
);
dialogPage.setNoButtonToPost(
true
);
dialogPage.setPostToCallingPage(
true
);
dialogPage.setOkButtonItemName(
"SaveYes"
);
dialogPage.setNoButtonItemName(
"SaveNo"
);
pageContext.redirectToDialogPage(dialogPage);
}
else
if
(pageContext.getParameter(
"SaveYes"
) !=
null
) {
am.invokeMethod(
"saveRecords"
);
throw
new
OAException(
"Data has been saved successfully."
,
OAException.CONFIRMATION);
}
else
if
(pageContext.getParameter(
"SaveNo"
) !=
null
) {
am.invokeMethod(
"undoChanges"
);
}
public
void
saveRecords() {
getOADBTransaction().commit();
}
public
void
undoChanges() {
getOADBTransaction().rollback();
}
********************************************************************************
This comment has been removed by the author.
ReplyDelete