Re: D2W factory with custom editingContext
Anjo Krank <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Sth like:
D2W.setFactory(new D2W() {
public EditPageInterface editPageForNewObjectWithEntityNamed
(String entityName, WOSession session) {
MyOwnEditingContext myContext = new MyOwnEditingContext
(session.defaultEditingContext());
EOEnterpriseObject aNewEO = _newObjectWithEntityNamed
(entityName, session, peerContext);
..
}
});
in your apps constructor.
Cheers, Anjo
Am 27.04.2006 um 10:13 schrieb Holzner Roman:
> Hi list
>
> I've got a really urgent question. We are developing a application
> where we have a our own EOEditingContext. For the administration
> part we use the D2W framework to keep the work small. But now we
> saw, that the in the factory, the methods to create new objects
> (editPageForNewObjectWithEntityNamed(String entityName, WOSession
> session) and editPageForNewObjectWithConfigurationNamed(String
> configurationName, WOSession session)) do only use their own
> EOEditingContext.
>
> Here you can see what I meen:
>
> public EditPageInterface editPageForNewObjectWithEntityNamed
> (String entityName, WOSession session)
> {
> EOEditingContext peerContext = new EOEditingContext
> (session.defaultEditingContext().parentObjectStore());
> EOEnterpriseObject aNewEO = _newObjectWithEntityNamed
> (entityName, session, peerContext);
> ..
> }
>
> What I would need is something like:
> ...
> MyOwnEditingContext myContext = new MyOwnEditingContext
> (session.defaultEditingContext());
> EOEnterpriseObject aNewEO = _newObjectWithEntityNamed(entityName,
> session, myOwnEditingContext);
> ...
>
>
> How can I work around that? Any ideas. Every answers would be
> helpfully for me
>
> Greets
> Roman
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev