You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by hn...@apache.org on 2017/04/04 15:10:03 UTC

svn commit: r1790134 - in /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main: java/org/apache/myfaces/tobago/example/demo/ConversationController.java webapp/content/30-concept/15-conversation/conversation.xhtml

Author: hnoeth
Date: Tue Apr  4 15:10:03 2017
New Revision: 1790134

URL: http://svn.apache.org/viewvc?rev=1790134&view=rev
Log:
improve demo
* fix conversation scope example

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ConversationController.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/15-conversation/conversation.xhtml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ConversationController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ConversationController.java?rev=1790134&r1=1790133&r2=1790134&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ConversationController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ConversationController.java Tue Apr  4 15:10:03 2017
@@ -35,7 +35,7 @@ public class ConversationController impl
   private static final Logger LOG = LoggerFactory.getLogger(ConversationController.class);
 
   @Inject
-  Conversation conversation;
+  private Conversation conversation;
   private int count = 0;
 
   public String getConversationStatus() {

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/15-conversation/conversation.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/15-conversation/conversation.xhtml?rev=1790134&r1=1790133&r2=1790134&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/15-conversation/conversation.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/30-concept/15-conversation/conversation.xhtml Tue Apr  4 15:10:03 2017
@@ -32,10 +32,10 @@
   <tc:box label="Example">
     <p>Counting up greater than '1' is only possible when a conversation is started.</p>
     <tc:out label="Conversation" value="#{conversationController.conversationStatus}"/>
-    <tc:buttons>
-      <tc:button label="Start Conversation" action="#{conversationController.beginConversation}"/>
-      <tc:button label="Stop Conversation" action="#{conversationController.endConversation}"/>
-    </tc:buttons>
+    <tc:button label="Start Conversation" action="#{conversationController.beginConversation}"
+               rendered="#{conversationController.conversationStatus == 'stopped'}"/>
+    <tc:button label="Stop Conversation" action="#{conversationController.endConversation}"
+               rendered="#{conversationController.conversationStatus == 'started'}"/>
     <tc:separator/>
     <tc:out label="Count" value="#{conversationController.count}"/>
     <tc:button label="Count Up" action="#{conversationController.countUp}"/>