Announcement Announcement Module
Collapse
No announcement yet.
Overwriting default connect/Connected view for the provider Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Overwriting default connect/Connected view for the provider

    I'm learning spring social and kind of new to this framework. Can you please provide your expert advise for my problem below.

    After the user authentication in my project, I would like the authenicated members to connect to their social profile account from the landing page. But it looks like the ConnectController class always forwards the request to connected<ProviderId> view. Is there a way to override this functionality to return the original page where the member was initially landed.

    Thanks, I appreciate your help.
    Last edited by rallampati; May 7th, 2013, 07:32 AM.

  • #2
    Let me restate your question to be sure that I understand you correctly: Are you wanting to know how to override the default behavior of ConnectController so that it lands on a view of your choosing instead of the default "connected<ProviderId>" view?

    The only way to do that currently is to subclass ConnectController and override the connectedView() method. The reason you can't just set it via a property is largely because whatever you set the view to could (although doesn't necessarily need to) include the provider ID (as it does now).

    That said, I've never really liked answering questions like this with an answer that uses the word "override". If you would, I'd appreciate it if you could add an improvement issue at https://jira.springsource.org/browse/SOCIAL to request that the connected view (and the connect view) be configurable via property setters. Of course, the solution would need to be clever enough to support a placeholder for the provider ID (e.g., "connect/{providerId}Connected").

    Comment


    • #3
      Overriding default connect/Connected view of the Connect Controller

      Thank you very much Habuma! I was able to achieve the desired funcationality as you sugegsted but I like your idea of configuring the views with some settter properties, this gives lot of flexibility to choose the landing paging dynamically based on the application needs and requirements. I will go ahead and add this as an improvement issue to Spring social and I will look forward to see this feature in the later releases.

      Thank you!

      Comment

      Working...
      X