Save Points

Explicit save point : Requires an end user action before a bounded or unbounded task flow creates a save point. For example, an end user clicks a button that invokes a method call activity that, in turn, creates a save point Example by biemond http://biemond.blogspot.com/2008/04/restoring-transactions-with-adf.html Implicit save point : can only originate from a bounded task flow if 1) A session times out due to end user inactivity 2) An end user logs out without saving the data 3) An end user closes the only browser window, thus logging out of the application 4) An end user navigates away from the current application using control flow rules (for example, uses a goLink component to go to an external URL) and having unsaved data. Examples given by frank/biemond and on implicit save points http://www.oracle.com/technology/products/jdev/tips/fnimphius/cancelForm/cancelForm_wsp.html?_template=/ocom/print http://biemond.blogspot.com/2008/04/automatically-save-transactions-with.html Note: A database table named ORADFCSAVPT is used to store a save point. If this database table does not exist, it is created the first time that a save point is created. The entry in ORADFCSAVPT for a save point is removed after the save point is restored. ensure you have below one rest just follow the same steps as mentioned in biemond example, it works.
impsave.PNG
lets have few important sections of code from his example here, if we miss there atleast it'll be available here. '< af:panelGroupLayout layout="horizontal" >' '<'af:selectOneChoice label="Savepoints" value="#{pageFlowScope.saveId}" '>' ' <'f:selectItems value="#{savepoints.savepoints}"/'>' '<'/af:selectOneChoice'>' '<'af:commandButton text="Restore" action="restore"/'>' '<'af:commandButton text="Clear savepoints" action="{savepoints.clearSavepoints}"/'>' '<'/af:panelGroupLayout'>' Savepoint bean code. # import java.util.ArrayList; # import java.util.List; # # import javax.faces.model.SelectItem; # import oracle.adf.controller.ControllerContext; # import oracle.adf.controller.savepoint.SavePointAttributes; # import oracle.adf.controller.savepoint.SavePointManager; # # public class Savepoint { # # private ControllerContext cc; # private SavePointManager save; # # public Savepoint() { # cc = ControllerContext.getInstance(); # save = cc.getSavePointManager(); # } # # public List getSavepoints() # { # List options; # options = new ArrayList(); # List saves = save.listSavePointIds(); # SelectItem option; # int size = saves.size(); # for ( int i = 0 ; i < saves.size() ; i++) { # SavePointAttributes att = save.getSavePointAttributes(saves.get(i)); # option = new SelectItem(saves.get(i),saves.get(i)+att.getName()); # options.add(option); # } # return options; # } # public String clearSavepoints() { # save.clearSavePoints(); # return null; # } # }
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

bocadmin_ww

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today