• 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: returning another component or page
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: returning another component or page


  • Subject: Re: returning another component or page
  • From: Amedeo Mantica <email@hidden>
  • Date: Mon, 3 Nov 2008 21:08:16 +0100

there is every day something new to learn :)
Thanks
Amedeo

On 03/nov/08, at 21:00, Chuck Hill wrote:

WOApplication
.application().pageWithName(INPGNotSupportedBrowser.class.getName(), context );



On Nov 3, 2008, at 11:54 AM, Amedeo Mantica wrote:

ok, but I'm in the session...

how can i call pageWithName without instantiating a new WOComponent?

Amedeo

On 03/nov/08, at 20:52, Chuck Hill wrote:


On Nov 3, 2008, at 11:48 AM, Amedeo Mantica wrote:

thanks Chuck,

can I ask why is bad to call new?

It will totally confuse WO and can cause exceptions in many cases. NEVER do this.





Amedeo

On 03/nov/08, at 20:43, Chuck Hill wrote:


On Nov 3, 2008, at 11:39 AM, Amedeo Mantica wrote:

may be this piece code I made correct?
I override appendToResponse methon in Session
It works, but I don't know if it is correct..

Can you confirm?
Thanks
Amedeo


public void appendToResponse(WOResponse response, WOContext context) {
if ( this.browser().isIE() ) {
INPGNotSupportedBrowser nextPage = new INPGNotSupportedBrowser(context);

I'd say that using new with a WOComponent is a Very Bad Idea. Use pageWithName(). Other than that, this code looks OK.


Chuck

			response.setContent( nextPage.generateResponse().content() );
		}
		super.appendToResponse(response, context);
	}



On 03/nov/08, at 18:31, Amedeo Mantica wrote:

I have this need,

I can do it in Java script, but I prefer a server side solutions,

I have a boolean flag in my session, if this flag become false (or true) i need to switch all my requests outsite my woapplcation (a redirect)

pratically I have to put a redirect in my session. I suppose to do it via the awake or appendToResponse methods... I'm looking at docs but at the moment I'm unable to do it, any hint?

Thank You
Amedeo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects- email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


_______________________________________________ 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

-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects











-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects











-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects









_______________________________________________ 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: 
 >returning another component or page (From: Amedeo Mantica <email@hidden>)
 >Re: returning another component or page (From: Amedeo Mantica <email@hidden>)
 >Re: returning another component or page (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: returning another component or page
  • Next by Date: Applications respond "Access Denied" to wotaskd
  • Previous by thread: Re: returning another component or page
  • Next by thread: Re: Webobjects-dev Digest, Vol 5, Issue 1061
  • Index(es):
    • Date
    • Thread