• 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: takeValuesFromRequest not triggered
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: takeValuesFromRequest not triggered


  • Subject: Re: takeValuesFromRequest not triggered
  • From: Anthony Paras <email@hidden>
  • Date: Sun, 20 Mar 2005 12:16:10 -0500

TakeValuesFromRequest only gets called if it's a component action. Try
overriding this method in DirectAction like so:

public WOActionResults performActionNamed(String name) {

  if (existingSession() == null) {
    ((Session)session()).attemptAutoLoginFromCookie();
  }
  return super.performActionNamed(name).generateResponse();
}



On 3/20/05 8:59 AM, "Drew Thoeni" <email@hidden> wrote:

> I have the following method in my Main component, attempting to keep a user
> automatically logged in if they have selected so on their previous login. The
> cookie is writing out fine with appendToResponse. However, this method never
> gets triggered in Main when the user returns. Main is a DirectAction (have
> tried turning that off with same result).
>
> All docs point to this being correct. But since it's not working, I'm sure I'm
> missing something.
>
> Regards,
>
> Drew
>
>
>     public void takeValuesFromRequest(WORequest aRequest, WOContext aContext)
> {
>     super.takeValuesFromRequest(aRequest, aContext);
>     String primaryEmail = aRequest.cookieValueForKey("primaryEmail");
>     if (primaryEmail != null) {
>         NSDictionary bindings = new NSDictionary(primaryEmail,
> "primaryEmailIn");
>         User tempUser =
> (User)EOUtilities.objectWithFetchSpecificationAndBindings( ec, "User",
> "FetchSingleUser", bindings);
>         if (tempUser != null) {
>         session.currentPlayer = tempUser;
>         }
>     }
>     }
>
>
>  _______________________________________________
> 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




On 3/20/05 8:59 AM, "Drew Thoeni" <email@hidden> wrote:

> I have the following method in my Main component, attempting to keep a user
> automatically logged in if they have selected so on their previous login. The
> cookie is writing out fine with appendToResponse. However, this method never
> gets triggered in Main when the user returns. Main is a DirectAction (have
> tried turning that off with same result).
>
> All docs point to this being correct. But since it's not working, I'm sure I'm
> missing something.
>
> Regards,
>
> Drew
>
>
>     public void takeValuesFromRequest(WORequest aRequest, WOContext aContext)
> {
>     super.takeValuesFromRequest(aRequest, aContext);
>     String primaryEmail = aRequest.cookieValueForKey("primaryEmail");
>     if (primaryEmail != null) {
>         NSDictionary bindings = new NSDictionary(primaryEmail,
> "primaryEmailIn");
>         User tempUser =
> (User)EOUtilities.objectWithFetchSpecificationAndBindings( ec, "User",
> "FetchSingleUser", bindings);
>         if (tempUser != null) {
>         session.currentPlayer = tempUser;
>         }
>     }
>     }
>
>
>  _______________________________________________
> 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



 _______________________________________________
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: takeValuesFromRequest not triggered
      • From: Drew Thoeni <email@hidden>
References: 
 >takeValuesFromRequest not triggered (From: Drew Thoeni <email@hidden>)

  • Prev by Date: takeValuesFromRequest not triggered
  • Next by Date: Strange Exception less useless, but no less Strange
  • Previous by thread: takeValuesFromRequest not triggered
  • Next by thread: Re: takeValuesFromRequest not triggered
  • Index(es):
    • Date
    • Thread