Re: D2W factory with custom editingContext

Holzner Roman <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Well, yes, I think that works. The only difficulty that  I had here  
was the, that the method _newObjectWithEntityNamed(...) is a private  
one. But after looking in the Wonder framework (especially the  
ERD2WFactory) I found, what I needed to make it finish the rest.

Thanks Anjo


On 27.04.2006, at 10:27, Anjo Krank wrote:

> 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
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.