• 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
Re: Refreshing complete page from a header component
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refreshing complete page from a header component


  • Subject: Re: Refreshing complete page from a header component
  • From: Johan Henselmans <email@hidden>
  • Date: Fri, 29 Jun 2007 17:31:40 +0200




On 29-jun-2007, at 15:17, Paul Lynch wrote:

On 29 Jun 2007, at 12:31, Johan Henselmans wrote:

I must be missing something: I have a header component, which contains the menubar, and sets the default language, by calling session.setlanguages() via a WOHyperlink. After that I want to return the current page. But a "return this" from within the Header WOComponent will only return the header. Any idea how to get the current page returned from within the header component?

This is the structure:

WOComponent->Page
	WOComponent->Header
	rest....
	WOComponent->Footer

Try:

return context().page();

Paul

And On 29-jun-2007, at 13:38, Daniele Corti wrote:



this structure means:
Header is son of Page;
Footer is son of Page;
Page is parent of Header, Footer, rest...;
so from Header call this.parent () to get the Page component instance! Or you can Instance a new Page calling: Page next = (Page) this.pageForName(Page.class.getName());
then return next!

However, although a page is returned (as I can see from the contextID and the ElementID), the language that I choose is not displayed. I would expect the page to switch from English to French, (I have localized components in English.lproj and French.lproj) after I call


	mySess().setLanguages(new NSArray(new Object[]{"French"}) );
	return this.parent();


But that only happens when going to a next page. Is this some kind of clever caching that prevents the French page to be picked up?




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
References: 
 >Refreshing complete page from a header component (From: Johan Henselmans <email@hidden>)
 >Re: Refreshing complete page from a header component (From: Paul Lynch <email@hidden>)

  • Prev by Date: web.xml.template Variable Definitions
  • Next by Date: Re: How to preserve all the states of stateful components?
  • Previous by thread: Re: Refreshing complete page from a header component
  • Next by thread: Re: Refreshing complete page from a header component
  • Index(es):
    • Date
    • Thread