Re: Ponder: ERCoreBL User Sessions Stage Manager Actors ?

James Cicenia <[email protected]>
Newsgroups gmane.comp.web.webobjects.wonder-disc
Message-ID <[email protected]>
Yes I looked through... something is messed up. None of the above worked as expected
The only way I get it to work is to set it directly:

		ERXSession.session().objectStore().takeValueForKey(user,"user");


There is also a "flow bug."
If you have a required field in a new object, go off and maybe add some related records, cancel, cancel... bam.
Validation error... I think it tries to save and then sees that "title" wasn't entered and is required.



On Dec 21, 2012, at 8:49 PM, Ramsey Gurley <[email protected]> wrote:

> 
> On Dec 21, 2012, at 6:59 PM, James Cicenia wrote:
> 
>> Time to dive into understanding your threadstorage bits...
>> 
>> I display a list of users as admin.
>> I want to run my app as the user. 
>> To do this I wanted to swap out the session user with the user they picked.
>> 
>> I thought something like this:
>> 
>> ERCoreBL.setActor(eo);
>> 
>> But that doesn't seem to change my session user in:
>> 
>> user = (User) ERStageManager.USER.valueInObject(ERXSession.session().objectStore());
>> 
>> or
>> 
>> ERStageManager.INSTANCE.setActor(eo);
> 
> That should work. If you look at the code for that method, all it does is:
> 
> ERCoreBL.setActor(actor);
> ERXWOContext.currentContext().session();
> USER.takeValueInObject(actor, ERXSession.session().objectStore());
> 
> So if you call that and then turn around and say
> 
> user = (User)ERStageManager.USER.valueInObject(ERXSession.session().objectStore());
> 
> and get the wrong answer, then something is pretty messed up.
> 
>> 
>> That doesn't seem to work either.
>> 
>> Basically how do I swap user in the session.
>> 
>> Thanks
>> James
> 
>

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d

_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc
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.