From 1bed5b65a463f80be8ce93ad0912287066d6cacc Mon Sep 17 00:00:00 2001 From: stephanrauh Date: Sat, 30 May 2015 20:34:39 +0200 Subject: [PATCH] issue #2 reverted @Named because CDI is not activated in the project --- pom.xml | 9 ++------- src/main/java/net/bootsfaces/demo/BarcodeBean.java | 4 ++-- src/main/java/net/bootsfaces/demo/CarBean.java | 7 ++++--- src/main/java/net/bootsfaces/demo/ClockBean.java | 6 +++--- src/main/java/net/bootsfaces/demo/DateBean.java | 6 +++--- src/main/java/net/bootsfaces/demo/InformBean.java | 6 +++--- src/main/java/net/bootsfaces/demo/ItemBean.java | 6 +++--- src/main/java/net/bootsfaces/demo/LoremIpsumBean.java | 6 +++--- src/main/java/net/bootsfaces/demo/PollDemoBean.java | 6 +++--- src/main/java/net/bootsfaces/demo/SemaphoreBean.java | 7 ++++--- src/main/java/net/bootsfaces/demo/SettingsBean.java | 6 +++--- src/main/java/net/bootsfaces/demo/TestBean.java | 6 +++--- .../net/bootsfaces/issues/issue78/SoccerTeamBean.java | 4 ++-- .../org/primefaces/showcase/view/input/CalendarView.java | 4 ++-- 14 files changed, 40 insertions(+), 43 deletions(-) diff --git a/pom.xml b/pom.xml index f4d93bc0..8f13c9a5 100644 --- a/pom.xml +++ b/pom.xml @@ -62,14 +62,14 @@ de.beyondjava angularFaces-core - 2.1.4 + 2.1.5 org.primefaces primefaces - 5.1 + 5.2 compile @@ -103,11 +103,6 @@ 1.10 compile - - javax.enterprise - cdi-api - 1.2 - diff --git a/src/main/java/net/bootsfaces/demo/BarcodeBean.java b/src/main/java/net/bootsfaces/demo/BarcodeBean.java index 44ca80b9..db47f091 100644 --- a/src/main/java/net/bootsfaces/demo/BarcodeBean.java +++ b/src/main/java/net/bootsfaces/demo/BarcodeBean.java @@ -16,15 +16,15 @@ */ package net.bootsfaces.demo; +import javax.faces.bean.ManagedBean; import javax.faces.view.ViewScoped; -import javax.inject.Named; /** * This bean is used by the PrimeFaces barcode demo. * @author Stephan Rauh, http://www.beyondjava.net */ @ViewScoped -@Named +@ManagedBean public class BarcodeBean { private String code39 = "1234567890128"; private String protocol = "http://"; diff --git a/src/main/java/net/bootsfaces/demo/CarBean.java b/src/main/java/net/bootsfaces/demo/CarBean.java index a9d54f29..68fafed9 100644 --- a/src/main/java/net/bootsfaces/demo/CarBean.java +++ b/src/main/java/net/bootsfaces/demo/CarBean.java @@ -17,14 +17,15 @@ package net.bootsfaces.demo; -import javax.inject.Named; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.NotNull; /** A simple bean for demo purposes. */ -@javax.enterprise.context.RequestScoped -@Named +@RequestScoped +@ManagedBean public class CarBean { @NotNull private String brand=null; diff --git a/src/main/java/net/bootsfaces/demo/ClockBean.java b/src/main/java/net/bootsfaces/demo/ClockBean.java index bd4b0417..947d7714 100644 --- a/src/main/java/net/bootsfaces/demo/ClockBean.java +++ b/src/main/java/net/bootsfaces/demo/ClockBean.java @@ -7,15 +7,15 @@ import java.io.Serializable; import java.util.Calendar; -import javax.enterprise.context.RequestScoped; -import javax.inject.Named; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; import javax.validation.constraints.Max; import javax.validation.constraints.Min; /** * @author Stephan Rauh, http://www.beyondjava.net */ -@Named +@ManagedBean @RequestScoped public class ClockBean implements Serializable { private static final long serialVersionUID = 5497787734011747081L; diff --git a/src/main/java/net/bootsfaces/demo/DateBean.java b/src/main/java/net/bootsfaces/demo/DateBean.java index 82c7f84a..3e257314 100644 --- a/src/main/java/net/bootsfaces/demo/DateBean.java +++ b/src/main/java/net/bootsfaces/demo/DateBean.java @@ -6,14 +6,14 @@ import java.io.Serializable; import java.util.Date; -import javax.enterprise.context.RequestScoped; -import javax.inject.Named; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; /** * * @author TheCoder4eu */ -@Named +@ManagedBean @RequestScoped public class DateBean implements Serializable { private static final long serialVersionUID = -7642332089180105956L; diff --git a/src/main/java/net/bootsfaces/demo/InformBean.java b/src/main/java/net/bootsfaces/demo/InformBean.java index e31ba4d2..6e64c5c9 100644 --- a/src/main/java/net/bootsfaces/demo/InformBean.java +++ b/src/main/java/net/bootsfaces/demo/InformBean.java @@ -6,14 +6,14 @@ import java.io.Serializable; -import javax.enterprise.context.RequestScoped; -import javax.inject.Named; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; /** * * @author TheCoder4eu */ -@Named +@ManagedBean @RequestScoped public class InformBean implements Serializable { private static final long serialVersionUID = 3776366707374123185L; diff --git a/src/main/java/net/bootsfaces/demo/ItemBean.java b/src/main/java/net/bootsfaces/demo/ItemBean.java index 82c9630a..e721a8d4 100644 --- a/src/main/java/net/bootsfaces/demo/ItemBean.java +++ b/src/main/java/net/bootsfaces/demo/ItemBean.java @@ -1,15 +1,15 @@ package net.bootsfaces.demo; -import javax.enterprise.context.RequestScoped; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; import javax.faces.model.ArrayDataModel; import javax.faces.model.DataModel; -import javax.inject.Named; /** * Data Model Bean for Items * @author Thecoder4.eu */ -@Named +@ManagedBean @RequestScoped public class ItemBean { diff --git a/src/main/java/net/bootsfaces/demo/LoremIpsumBean.java b/src/main/java/net/bootsfaces/demo/LoremIpsumBean.java index a0c31741..13e0dbfa 100644 --- a/src/main/java/net/bootsfaces/demo/LoremIpsumBean.java +++ b/src/main/java/net/bootsfaces/demo/LoremIpsumBean.java @@ -7,16 +7,16 @@ import java.util.StringTokenizer; -import javax.enterprise.context.RequestScoped; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; import javax.faces.model.ArrayDataModel; import javax.faces.model.DataModel; -import javax.inject.Named; /** * Data Model Bean for Items * @author Thecoder4.eu */ -@Named +@ManagedBean @RequestScoped public class LoremIpsumBean { diff --git a/src/main/java/net/bootsfaces/demo/PollDemoBean.java b/src/main/java/net/bootsfaces/demo/PollDemoBean.java index d2964f50..3714ecd0 100644 --- a/src/main/java/net/bootsfaces/demo/PollDemoBean.java +++ b/src/main/java/net/bootsfaces/demo/PollDemoBean.java @@ -2,12 +2,12 @@ import java.util.Date; -import javax.enterprise.context.RequestScoped; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; import javax.faces.event.ActionEvent; -import javax.inject.Named; @RequestScoped -@Named +@ManagedBean public class PollDemoBean { private int counter=0; diff --git a/src/main/java/net/bootsfaces/demo/SemaphoreBean.java b/src/main/java/net/bootsfaces/demo/SemaphoreBean.java index 97a7e2d9..5b489e4b 100644 --- a/src/main/java/net/bootsfaces/demo/SemaphoreBean.java +++ b/src/main/java/net/bootsfaces/demo/SemaphoreBean.java @@ -22,12 +22,13 @@ import java.util.List; import java.util.Map; -import javax.inject.Named; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; import javax.validation.constraints.NotNull; /** A simple bean for demo purposes. */ -@javax.enterprise.context.RequestScoped -@Named +@RequestScoped +@ManagedBean public class SemaphoreBean { @NotNull private String color = null; diff --git a/src/main/java/net/bootsfaces/demo/SettingsBean.java b/src/main/java/net/bootsfaces/demo/SettingsBean.java index c0dc33c8..fe107f79 100644 --- a/src/main/java/net/bootsfaces/demo/SettingsBean.java +++ b/src/main/java/net/bootsfaces/demo/SettingsBean.java @@ -17,12 +17,12 @@ package net.bootsfaces.demo; -import javax.enterprise.context.RequestScoped; -import javax.inject.Named; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; /** A simple bean for demo purposes. */ @RequestScoped -@Named +@ManagedBean public class SettingsBean { private int value1; private int value2; diff --git a/src/main/java/net/bootsfaces/demo/TestBean.java b/src/main/java/net/bootsfaces/demo/TestBean.java index 8fcce7d4..04cdeb22 100644 --- a/src/main/java/net/bootsfaces/demo/TestBean.java +++ b/src/main/java/net/bootsfaces/demo/TestBean.java @@ -6,14 +6,14 @@ import java.io.Serializable; -import javax.enterprise.context.RequestScoped; -import javax.inject.Named; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; /** * * @author TheCoder4eu */ -@Named +@ManagedBean @RequestScoped public class TestBean implements Serializable { private static final long serialVersionUID = -332002335165889800L; diff --git a/src/main/java/net/bootsfaces/issues/issue78/SoccerTeamBean.java b/src/main/java/net/bootsfaces/issues/issue78/SoccerTeamBean.java index 8b8e2f2f..eb1422da 100644 --- a/src/main/java/net/bootsfaces/issues/issue78/SoccerTeamBean.java +++ b/src/main/java/net/bootsfaces/issues/issue78/SoccerTeamBean.java @@ -4,11 +4,11 @@ import java.util.ArrayList; import java.util.List; +import javax.faces.bean.ManagedBean; import javax.faces.event.ComponentSystemEvent; import javax.faces.view.ViewScoped; -import javax.inject.Named; -@Named +@ManagedBean @ViewScoped public class SoccerTeamBean implements Serializable { private static final long serialVersionUID = 1L; diff --git a/src/main/java/org/primefaces/showcase/view/input/CalendarView.java b/src/main/java/org/primefaces/showcase/view/input/CalendarView.java index 9af44690..304c88d4 100644 --- a/src/main/java/org/primefaces/showcase/view/input/CalendarView.java +++ b/src/main/java/org/primefaces/showcase/view/input/CalendarView.java @@ -4,13 +4,13 @@ import java.util.Date; import javax.faces.application.FacesMessage; +import javax.faces.bean.ManagedBean; import javax.faces.context.FacesContext; -import javax.inject.Named; import org.primefaces.context.RequestContext; import org.primefaces.event.SelectEvent; -@Named +@ManagedBean public class CalendarView { private Date date1;