From 2fdb1a0264ede365e0dfef2a7a1f7960e8145f25 Mon Sep 17 00:00:00 2001 From: Antoine Sabot-Durand Date: Fri, 28 Oct 2011 04:34:54 +0200 Subject: [PATCH] RESOLVED - issue SEAMSOCIAL-24: webClient - closing connection of active profile fails https://issues.jboss.org/browse/SEAMSOCIAL-24 --- .../examples/webclient/SocialClient.java | 2 +- .../web-client/src/main/webapp/timeline.xhtml | 28 +++++++++++-------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/examples/web-client/src/main/java/org/jboss/seam/social/examples/webclient/SocialClient.java b/examples/web-client/src/main/java/org/jboss/seam/social/examples/webclient/SocialClient.java index f402567..9a8974f 100644 --- a/examples/web-client/src/main/java/org/jboss/seam/social/examples/webclient/SocialClient.java +++ b/examples/web-client/src/main/java/org/jboss/seam/social/examples/webclient/SocialClient.java @@ -108,7 +108,7 @@ public void redirectToAuthorizationURL(String url) throws IOException { } public String getTimeLineUrl() { - if (getCurrentService().isConnected()) + if (getCurrentService() != null && getCurrentService().isConnected()) return "/WEB-INF/fragments/" + getCurrentService().getType().toLowerCase() + ".xhtml"; return ""; } diff --git a/examples/web-client/src/main/webapp/timeline.xhtml b/examples/web-client/src/main/webapp/timeline.xhtml index 1807bc7..bacc18c 100644 --- a/examples/web-client/src/main/webapp/timeline.xhtml +++ b/examples/web-client/src/main/webapp/timeline.xhtml @@ -11,10 +11,23 @@

Your (future) Timeline

+ rendered="#{not(empty currentService) and currentService.connected}"> Welcome #{currentService.myProfile.fullName}
You are now working with #{currentService.name}
+
+ You can close connexion on + +
+ Or choose the Social network you want to work with.. : + + + +
You can add a new connexion to those social network :
- close connexion on - + - Or choose the Social network you want to work with.. : - - - - +