If I find myself trying to access session variables from business classes, I soon realise I need to refactor something.

Can't you pass the parameter directly? Alternatively use ERXThreadStorage?

Good luck

Mark

--
Dr. Mark Wardle
Specialist registrar, Neurology
(Sent from my mobile)


On 13 Feb 2010, at 02:45, Drew Thoeni <[email protected]> wrote:

I'm sure this is one of the times where I wasn't paying attention when I was learning about WO, but I'm a bit stumped by the calling of session from classes that are not associated with components.

I'm trying to record a value input from the screen to a session variable and then use it in a class that is not part of a web component (it's a class that is called to do some database maintenance).

Here's the basic setup.

Main allows input from the user and records a user option to session variable "target"

ContactUpdate is trying to retrieve the value within the session.target() but the standard code (below) gives an exception "The method session is undefined for type ContactUpdate."

        private Session session = (Session)session();

I have imported the com.sqe.app.Session into ContactUpdate and tried everything else I can think of but I'm at a total loss as to why I can address session in "Main" but not in ContactUpdate.

All help to the novice here is appreciated.

Best,

Drew
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/mark %40wardle.org

This email sent to [email protected]
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to