• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Making EOs aware of session properties (I know they should not but I need this anyway)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Making EOs aware of session properties (I know they should not but I need this anyway)


  • Subject: Making EOs aware of session properties (I know they should not but I need this anyway)
  • From: Markus Ruggiero <email@hidden>
  • Date: Sat, 07 Nov 2015 15:56:55 +0100

Folks,

I have the following problem:
My application must support different geographical regions. A logged-in user is assigned a region. This uses info is stored in Session. My EOs have business logic that must act region specific. How can I let the EOs know about the current region (from session().currentUser().region() )? The business logic is in its own framework and knows nothing about sessions (which is how it supposed to be). Would ERXThreadStorage be of any help here?

Example of what I need:
Entity Product has a region specific product description. So simple accessors "description()" and "setDescription(String text)" are not good enough. The logic inside these accessors MUST take the current user's region into account.

I used to have my own editing context class with a session instance variable. This worked before because I had the business logic and all the controller code in the same project. Now with the separation into different projects this does not work anymore (which is actually quite ok, I know it was a kludge before).

Thanks for any help
---markus---
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Making EOs aware of session properties (I know they should not but I need this anyway)
      • From: Samuel Pelletier <email@hidden>
    • Re: Making EOs aware of session properties (I know they should not but I need this anyway)
      • From: Mark Wardle <email@hidden>
    • Re: Making EOs aware of session properties (I know they should not but I need this anyway)
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: Documenting the EO Model
  • Next by Date: Re: Making EOs aware of session properties (I know they should not but I need this anyway)
  • Previous by thread: Re: Documenting the EO Model
  • Next by thread: Re: Making EOs aware of session properties (I know they should not but I need this anyway)
  • Index(es):
    • Date
    • Thread