You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/12/05 10:59:57 UTC
svn commit: r1417335 - in
/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main:
java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java
webapp/WEB-INF/faces-config.xml
Author: lofwyr
Date: Wed Dec 5 09:59:57 2012
New Revision: 1417335
URL: http://svn.apache.org/viewvc?rev=1417335&view=rev
Log:
demo: use CDI
Modified:
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java?rev=1417335&r1=1417334&r2=1417335&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/TobagoDemoController.java Wed Dec 5 09:59:57 2012
@@ -35,6 +35,7 @@ import org.apache.myfaces.tobago.util.Cr
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import javax.enterprise.context.SessionScoped;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIColumn;
import javax.faces.component.UIComponent;
@@ -44,14 +45,18 @@ import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
import javax.faces.validator.ValidatorException;
+import javax.inject.Named;
import javax.servlet.http.HttpSession;
import javax.swing.tree.DefaultMutableTreeNode;
import java.io.IOException;
+import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-public class TobagoDemoController {
+@SessionScoped
+@Named("demo")
+public class TobagoDemoController implements Serializable {
private static final Logger LOG = LoggerFactory.getLogger(TobagoDemoController.class);
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml?rev=1417335&r1=1417334&r2=1417335&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml Wed Dec 5 09:59:57 2012
@@ -55,12 +55,6 @@
</converter>
<managed-bean>
- <managed-bean-name>demo</managed-bean-name>
- <managed-bean-class>org.apache.myfaces.tobago.example.demo.TobagoDemoController</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <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>