rickcr
Sep 26th, 2011, 07:01 PM
I know there are two other posts now that are dealing with the ConnectController http://forum.springsource.org/showthread.php?114836-API-binding-was-created-without-authorization and
http://forum.springsource.org/showthread.php?114878-Change-DispatcherServlet-map-not-to-be-the-root-of-the-app-in-social-samples
but not sure if I should hijack them for this question or not even though it's somewhat related but also could just have a simple spring basics answer.
In the ConnectController eventually connectionStatus is called which does a redirect (upon success using facebook as an example) to
/connect/facebookConnected
In our current app we're using some old tiles stuff but all I want to do is stuff a message into scope (Request?) such as "You are successfully connected with Facebook" and then display that message on the home page (I'll probably need a flag also to look at since I don't want to show the facebookConnect button if the user has already been connected.) What's the best approach to take to accomplish this?
I do have an interceptor class (similar to the UserInterceptor in the samples) so I thought about handling things there?
Right now all I have is a facebookConnected.jsp which I really don't need and is mapped via tiles as:
<definition name="connect/facebookConnected" path="/WEB-INF/jsp/springsocial/connect/facebookConnected.jsp"/>
Our current app is mapped to the spring dispatchServlet based on some extensions (eg *.sdo) and I also added social/*
What might be beneficial in our case is if the return from connectView could append a suffix, then I could map the return directly to a controller (although I think I saw a way I could map a tile definition to a custom controller as well?)
http://forum.springsource.org/showthread.php?114878-Change-DispatcherServlet-map-not-to-be-the-root-of-the-app-in-social-samples
but not sure if I should hijack them for this question or not even though it's somewhat related but also could just have a simple spring basics answer.
In the ConnectController eventually connectionStatus is called which does a redirect (upon success using facebook as an example) to
/connect/facebookConnected
In our current app we're using some old tiles stuff but all I want to do is stuff a message into scope (Request?) such as "You are successfully connected with Facebook" and then display that message on the home page (I'll probably need a flag also to look at since I don't want to show the facebookConnect button if the user has already been connected.) What's the best approach to take to accomplish this?
I do have an interceptor class (similar to the UserInterceptor in the samples) so I thought about handling things there?
Right now all I have is a facebookConnected.jsp which I really don't need and is mapped via tiles as:
<definition name="connect/facebookConnected" path="/WEB-INF/jsp/springsocial/connect/facebookConnected.jsp"/>
Our current app is mapped to the spring dispatchServlet based on some extensions (eg *.sdo) and I also added social/*
What might be beneficial in our case is if the return from connectView could append a suffix, then I could map the return directly to a controller (although I think I saw a way I could map a tile definition to a custom controller as well?)