Changes for page Using a custom EOEditingContext (ERXEC) Subclass
Last modified by Kieran Kelleher on 2007/07/03 11:53
From version 3.1
edited by Kieran Kelleher
on 2007/07/03 11:53
on 2007/07/03 11:53
Change comment:
There is no comment for this version
To version 2.1
edited by Kieran Kelleher
on 2007/07/03 11:52
on 2007/07/03 11:52
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,20 +2,22 @@ 2 2 3 3 {{code}} 4 4 5 -public class MyEditingContext extends ERXEC { 6 6 6 +public class MyEditingContext extends ERXEC { 7 + 7 7 public MyEditingContext(EOObjectStore anObjectStore) { 8 8 super(anObjectStore); 9 9 } 10 - 11 + 11 11 public MyEditingContext() { 12 12 super(); 13 13 } 14 - 15 + 15 15 // Your custom logic here... 16 - 17 + 17 17 } 18 18 20 + 19 19 {{/code}} 20 20 21 21 ==== Create the ERXEC.DefaultFactory Subclass ==== ... ... @@ -22,15 +22,16 @@ 22 22 23 23 {{code}} 24 24 25 -public class MyEditingContextFactory extends ERXEC.DefaultFactory { 26 26 28 +public class MyEditingContextFactory extends ERXEC.DefaultFactory { 29 + 27 27 public MyEditingContextFactory() { 28 28 super(); 29 29 } 30 - 33 + 31 31 protected EOEditingContext _createEditingContext(EOObjectStore parent) { 32 32 return new MyEditingContext(parent == null ? EOEditingContext.defaultParentObjectStore() : parent);; 33 - } 36 + } 34 34 } 35 35 36 36 {{/code}} ... ... @@ -41,7 +41,7 @@ 41 41 42 42 {{code}} 43 43 44 -public Application() { 47 + public Application() { 45 45 super(); 46 46 47 47 // Configure the Editing Context factory for my subclass of ERXEC ... ... @@ -53,10 +53,10 @@ 53 53 54 54 {{/code}} 55 55 56 -==== Creating an Instance of Your CustomEditingSubclass====59 +==== Creating an EditingContext ==== 57 57 58 58 {{code}} 59 59 60 -EOEditingContext ec = ERXEC.newEditingContext(); 63 + EOEditingContext ec = ERXEC.newEditingContext(); 61 61 62 62 {{/code}}