openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r759435 - /incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/conversation/ShoppingCardBean.java
Date Sat, 28 Mar 2009 07:19:28 GMT
Author: gerdogdu
Date: Sat Mar 28 07:19:26 2009
New Revision: 759435

URL: http://svn.apache.org/viewvc?rev=759435&view=rev
Log:
Updating usage of message utility.

Modified:
    incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/conversation/ShoppingCardBean.java

Modified: incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/conversation/ShoppingCardBean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/conversation/ShoppingCardBean.java?rev=759435&r1=759434&r2=759435&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/conversation/ShoppingCardBean.java
(original)
+++ incubator/openwebbeans/trunk/samples/guess/src/main/java/org/apache/webbeans/sample/conversation/ShoppingCardBean.java
Sat Mar 28 07:19:26 2009
@@ -21,10 +21,11 @@
 import javax.annotation.Named;
 import javax.context.Conversation;
 import javax.context.RequestScoped;
+import javax.faces.application.FacesMessage;
 import javax.inject.Current;
 
 import org.apache.webbeans.sample.model.conversation.ConversationModel;
-import org.apache.webbeans.util.JSFUtil;
+import org.apache.webbeans.sample.util.FacesMessageUtil;
 
 @RequestScoped
 @Named
@@ -36,13 +37,15 @@
     
     private @Current ConversationModel model;
     
+    private @Current FacesMessageUtil messageUtil;
+    
     private String book;
     
     public String startConversation()
     {
         conversation.begin();
         
-        JSFUtil.addInfoMessage("Conversation with id : " + conversation.getId() + " is started");
+        messageUtil.addMessage(FacesMessage.SEVERITY_INFO, "Conversation with id : " + conversation.getId()
+ " is started", null);
         
         return null;
     }
@@ -58,14 +61,15 @@
             buffer.append("," + b);
         }
         
-        JSFUtil.addInfoMessage(buffer.toString() + "]");
+        messageUtil.addMessage(FacesMessage.SEVERITY_INFO, buffer.toString() + "]", null);
+        
         
         return null;
     }
     
     public String endConversation()
     {
-        JSFUtil.addInfoMessage("Conversation with id : " + conversation.getId() + " is ended");
+        messageUtil.addMessage(FacesMessage.SEVERITY_INFO, "Conversation with id : " + conversation.getId()
+ " is ended", null);
         
         conversation.end();        
         



Mime
View raw message