• 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: automatically session creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automatically session creation


  • Subject: Re: automatically session creation
  • From: Francesco Romano <email@hidden>
  • Date: Sat, 27 Nov 2010 13:33:35 +0100

What I want to do is changing this code inside a direct action (which does not create a session but does not allow me to change its secure flag)

nextPage = pageWithName(RegisterUser.class);
nextPage.takeValueForKey(Boolean.TRUE, "success");
return nextPage;

to something equivalent where I can change the secure flag...
If I understand correctly if I use ERXRedirect I have to use direct actions, so... I have to create a "dummy" direct action which simply redirect to the page I want, and than user ERXRedirect 

This is my code:

ERXRedirect redirect = pageWithName(ERXRedirect.class);
redirect.setUrl(context().directActionURLForActionNamed("UserAction/helpRedirect",
new NSDictionary<String, Object>(new Object[] {Boolean.TRUE}, new String[] {"registration"}),
false,
true));


return redirect;

public WOActionResults helpRedirectAction() {


WOComponent nextPage = pageWithName(UtilitiesPage.class);
NSArray<String> dict = request().formValueKeys();
for (String key: dict)
nextPage.takeValueForKey(request().formValueForKey(key), key);
return nextPage;

}


and in my utilities page:

public void setRegistration(Object value) {
if (value != null) {
if (value.getClass().equals(String.class))
this._registration = new BooleanHolder(Boolean.parseBoolean((String)value));
else if (value.getClass().equals(Boolean.class))
this._registration = new BooleanHolder((Boolean)value);
}


else
_registration = null;
}


It seems to work, but.... is this really necessary?

Francesco
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: automatically session creation
      • From: Simon <email@hidden>
References: 
 >automatically session creation (From: Francesco Romano <email@hidden>)
 >Re: automatically session creation (From: Henrique Gomes <email@hidden>)
 >Re: automatically session creation (From: Francesco Romano <email@hidden>)
 >Re: automatically session creation (From: Simon <email@hidden>)

  • Prev by Date: Re: automatically session creation
  • Next by Date: Re: automatically session creation
  • Previous by thread: Re: automatically session creation
  • Next by thread: Re: automatically session creation
  • Index(es):
    • Date
    • Thread