• 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
How do I restore the 'previous' page with DirectActions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I restore the 'previous' page with DirectActions


  • Subject: How do I restore the 'previous' page with DirectActions
  • From: Riccardo De Menna <email@hidden>
  • Date: Fri, 20 Nov 2009 11:38:16 -0800

Hi all,

Just a quickie...

I want to return the same page a user is viewing after he clicks a directAction. Specifically I'm talking about a language switch link in the pageWrapper to change languages. I want a simple url like http://www.domain.com/cgi-bin/WebObjects/App.woa/wa/English

What I'm doing atm is adding a link with the following binding:

> LanguageLink : WOHyperlink {
> 	directActionName = aLanguage;
> 	?contextID = context.contextID;
> }


And then in my DirectAction.class I'm intercepting it with:

> public WOActionResults performActionNamed(String anActionName) {
>    ...
>
>    // Do the language switching here
>
>    ...
>
>    String stringContextID = (String)req.formValueForKey("contextID");
>    return s.restorePageForContextID(stringContextID);
> }


This mostly works... but sometimes I get errors since for no apparent reason the WOHyperlink does not include the ?contextID thing sometimes.
Am I doing it correctly?

I just want the equivalent of returning null on a component based action.

rdm _______________________________________________
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: How do I restore the 'previous' page with DirectActions
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: back to deploy problems
  • Next by Date: Re: Velocity Template Question
  • Previous by thread: Re: WOCommunity screencasts not working
  • Next by thread: Re: How do I restore the 'previous' page with DirectActions
  • Index(es):
    • Date
    • Thread