myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1733586 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main: java/org/apache/myfaces/tobago/example/demo/ java/org/apache/myfaces/tobago/example/demo/bestpractice/ webapp/WEB-INF/
Date Fri, 04 Mar 2016 11:06:18 GMT
Author: lofwyr
Date: Fri Mar  4 11:06:17 2016
New Revision: 1733586

URL: http://svn.apache.org/viewvc?rev=1733586&view=rev
Log:
demo cleanup

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.java?rev=1733586&r1=1733585&r2=1733586&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ServerInfo.java
Fri Mar  4 11:06:17 2016
@@ -22,7 +22,9 @@ package org.apache.myfaces.tobago.exampl
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.enterprise.context.ApplicationScoped;
 import javax.faces.context.FacesContext;
+import javax.inject.Named;
 import javax.servlet.ServletContext;
 import java.io.FileInputStream;
 import java.io.IOException;
@@ -39,6 +41,8 @@ import java.util.Properties;
  * The file name can be changed with a system property with name <code>{@value #CONFIG_FILE}</code>.
  *
  */
+@ApplicationScoped
+@Named("info")
 public class ServerInfo {
 
   private static final Logger LOG = LoggerFactory.getLogger(ServerInfo.class);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java?rev=1733586&r1=1733585&r2=1733586&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TreeController.java
Fri Mar  4 11:06:17 2016
@@ -25,12 +25,17 @@ import org.apache.myfaces.tobago.example
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.enterprise.context.SessionScoped;
 import javax.faces.event.ActionEvent;
+import javax.inject.Named;
 import javax.swing.tree.DefaultMutableTreeNode;
+import java.io.Serializable;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 
-public class TreeController {
+@SessionScoped
+@Named
+public class TreeController implements Serializable {
 
   private static final Logger LOG = LoggerFactory.getLogger(TreeController.class);
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.java?rev=1733586&r1=1733585&r2=1733586&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/BestPracticeController.java
Fri Mar  4 11:06:17 2016
@@ -23,12 +23,15 @@ import org.apache.commons.io.IOUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.enterprise.context.RequestScoped;
 import javax.faces.context.FacesContext;
+import javax.inject.Named;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.io.InputStream;
 
-
+@RequestScoped
+@Named
 public class BestPracticeController {
 
   private static final Logger LOG = LoggerFactory.getLogger(BestPracticeController.class);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.java?rev=1733586&r1=1733585&r2=1733586&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/bestpractice/TransitionController.java
Fri Mar  4 11:06:17 2016
@@ -22,6 +22,11 @@ package org.apache.myfaces.tobago.exampl
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Named;
+
+@RequestScoped
+@Named
 public class TransitionController {
 
   private static final Logger LOG = LoggerFactory.getLogger(TransitionController.class);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml?rev=1733586&r1=1733585&r2=1733586&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
Fri Mar  4 11:06:17 2016
@@ -54,23 +54,11 @@
     <converter-class>org.apache.myfaces.tobago.example.data.SalutationConverter</converter-class>
   </converter>
 
-  <managed-bean>
-    <managed-bean-name>treeController</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.TreeController</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-  </managed-bean>
-
   <lifecycle>
     <phase-listener>org.apache.myfaces.tobago.example.demo.SynchronizeNavigationPhaseListener</phase-listener>
     <!--<phase-listener>org.apache.myfaces.tobago.util.DebugPhaseListener</phase-listener>-->
   </lifecycle>
 
-  <managed-bean>
-    <managed-bean-name>info</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.ServerInfo</managed-bean-class>
-    <managed-bean-scope>application</managed-bean-scope>
-  </managed-bean>
-
   <!--  overview  -->
 
   <lifecycle>
@@ -100,18 +88,6 @@
   <!--best practice-->
 
   <managed-bean>
-    <managed-bean-name>bestPracticeController</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.bestpractice.BestPracticeController</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-
-  <managed-bean>
-    <managed-bean-name>transitionController</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.bestpractice.TransitionController</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-
-  <managed-bean>
     <managed-bean-name>customizer</managed-bean-name>
     <managed-bean-class>org.apache.myfaces.tobago.example.demo.bestpractice.ToolBarCustomizer</managed-bean-class>
     <managed-bean-scope>session</managed-bean-scope>
@@ -175,28 +151,4 @@
     </exception-handler-factory>
   </factory>
 
-  <managed-bean>
-    <managed-bean-name>reference</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.Controller</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-  </managed-bean>
-
-  <managed-bean>
-    <managed-bean-name>progress</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.Progress</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-  </managed-bean>
-
-  <managed-bean>
-    <managed-bean-name>selectBooleanCheckboxController</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.SelectBooleanCheckboxController</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-  </managed-bean>
-
-  <managed-bean>
-    <managed-bean-name>partialReloadController</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.tobago.example.demo.PartialReloadController</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-
 </faces-config>



Mime
View raw message