Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add always redirect option to WARegistry #364

Closed
GoogleCodeExporter opened this issue Mar 25, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Mar 25, 2015

When WARegistry>>handle:registering: is called, it could check a
configuration option as to whether to perform a redirect or not (default
would be NO, the current behaviour).

Some people might want to turn this on because it ensures that hitting
Refresh on the first page does not generate a new request handler (Session
in the case of WAApplication, but WARegistry is more generic than that).

The redirect would need to ensure to set the cookie and/or URL key for the
newly registered handler before returning a redirect response.

Original issue reported on code.google.com by jfitz...@gmail.com on 13 Mar 2009 at 11:25

@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 25, 2015

Original comment by jfitz...@gmail.com on 13 Mar 2009 at 11:25

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 25, 2015

I added this possible fix (untested) to a recent email discussion:

You can get around this by calling "self requestContext redirect"
somewhere like your root component's #initialRequest: method.

I'm not certain that's the right place, but I think it should work ok as a 
workaround.

Original comment by jfitz...@gmail.com on 10 Mar 2010 at 10:12

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 25, 2015

Now that is fixed this can be solved much for nicely by subclassing 
WAInitialRenderLoopContinuation and overriding #shouldRedirect to answer true.

Name: Seaside-RenderLoop-pmm.79
Author: pmm
Time: 25 August 2011, 5:00:14 pm
UUID: 6eea6fa3-223e-4cf5-8922-759087544564
Ancestors: Seaside-RenderLoop-pmm.78

- Issue 364:    add always redirect option to WARegistry
- add class comment to WAInitialRenderLoopContinuation

Original comment by philippe...@gmail.com on 25 Aug 2011 at 4:01

  • Changed state: Fixed
  • Added labels: Priority-Low, Version-Seaside3.1
  • Removed labels: Priority-Medium
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 25, 2015

Why subclass?

I'd rather just make shouldRedirect an instance variable (probably at the top 
of the hierarchy). If it's nil, we can use whatever crazy lookup behaviour we 
want I guess, but if not, we use whatever value was specified for that instance.

Original comment by jfitz...@gmail.com on 25 Aug 2011 at 4:17

  • Added labels: ****
  • Removed labels: ****
@GoogleCodeExporter

This comment has been minimized.

Copy link
Author

@GoogleCodeExporter GoogleCodeExporter commented Mar 25, 2015

You implemented it that way ;-)

For the really, really case when this is needed I guess making a subclass is 
justified if that saves us configuration and other complexity.

Original comment by philippe...@gmail.com on 25 Aug 2011 at 5:27

  • Added labels: ****
  • Removed labels: ****
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.