Skip to content

Commit

Permalink
RESOLVED - issue SEAMSOCIAL-24: webClient - closing connection of active
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinesd committed Oct 28, 2011
1 parent f0bee39 commit 2fdb1a0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
Expand Up @@ -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 "";
}
Expand Down
28 changes: 16 additions & 12 deletions examples/web-client/src/main/webapp/timeline.xhtml
Expand Up @@ -11,10 +11,23 @@
<p>Your (future) Timeline</p>
<h:form id="form">
<h:panelGroup id="timeline"
rendered="#{currentService.connected}">
rendered="#{not(empty currentService) and currentService.connected}">
Welcome #{currentService.myProfile.fullName}<br/>
You are now working with #{currentService.name}<br/>
<ui:include src="#{socialClient.timeLineUrl}"/>
<br/>
You can close connexion on
<h:commandLink
action="#{socialClient.resetConnection}"
value="#{currentService.name}"/>
<br/>
Or choose the Social network you want to work with.. :
<h:selectOneRadio id="chooseService"
value="#{socialClient.currentServiceName}">
<f:selectItems value="#{socialClient.services}" var="serv"
itemValue="#{serv.name}" itemLabel="#{serv.name}"/>
<f:ajax render="form"/>
</h:selectOneRadio>
</h:panelGroup>
You can add a new connexion to those social network :
<ul>
Expand All @@ -27,19 +40,10 @@
</ui:repeat>
</ul>
<br/>
close connexion on
<h:commandLink
action="#{socialClient.resetConnection}"
value="#{currentService.name}"/>



Or choose the Social network you want to work with.. :
<h:selectOneRadio id="chooseService"
value="#{socialClient.currentServiceName}">
<f:selectItems value="#{socialClient.services}" var="serv"
itemValue="#{serv.name}" itemLabel="#{serv.name}"/>
<f:ajax render="form"/>
</h:selectOneRadio>

</h:form>
</ui:define>
</ui:composition>

0 comments on commit 2fdb1a0

Please sign in to comment.