• 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
awake, awake, sleep, sleep: when does which component gets its settings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awake, awake, sleep, sleep: when does which component gets its settings?


  • Subject: awake, awake, sleep, sleep: when does which component gets its settings?
  • From: Johan Henselmans <email@hidden>
  • Date: Mon, 9 Jul 2007 09:28:58 +0200

I am trying to stay awake during this question, although I feel a bit sleepy:

I am struggling with the following problem: I have localized components that I want to switch to a different language on the fly. So a dutchman edits in English, discovers that her/his English is far worse that he assumes, and wants to fall back to dutch.

No problem, I'd think: some nice flags in the header component, do a setLanguages of the session, and return the page via context().page (), and all is done.

But somehow the flow of application->session->component on taking arguments in
and of application->session->component in rendering the page
does not agree with my logic.


Every time I sent the page out, the first time I click on the flag, the page remains in the current language. The second click sets the page in the previous language chosen.

I assumed that the flag-component sets the values in the session, and then during the rendering, the session transfers its info ("Thou shalt render in Dutch") to the components.

I have tried to get rid of every possible cache interference by

       setCachingEnabled(false);
on application, session and component level,
and
        setPageRefreshOnBacktrackEnabled(true);
        setPageCacheSize(0);
in the Application()

so that should not come into play.

Is it that trying to set the session variables from the component is too late, as the session has already taken in it's arguments for the current request-response loop?

If that is the case how can I set session variables then, that should take care of the next rendering of components?


Regards,

Johan Henselmans
http://www.netsense.nl
Tel: +31-20-6267538
Fax: +31-20-6273852


_______________________________________________ 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: awake, awake, sleep, sleep: when does which component gets its settings?
      • From: Ralf Schuchardt <email@hidden>
  • Prev by Date: Re: WOBuilder Replacement - Another idea
  • Next by Date: Re: [Wonder-disc] WebObjects documentation site
  • Previous by thread: Re: Webobjects-dev Digest, Vol 4, Issue 515
  • Next by thread: Re: awake, awake, sleep, sleep: when does which component gets its settings?
  • Index(es):
    • Date
    • Thread