Author: ppitonak(a)redhat.com
Date: 2011-03-22 05:09:34 -0400 (Tue, 22 Mar 2011)
New Revision: 22291
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java
Log:
added a workaround for a bug with @ManagedProperty in MyFaces
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java 2011-03-22
09:09:06 UTC (rev 22290)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichSelectBean.java 2011-03-22
09:09:34 UTC (rev 22291)
@@ -27,7 +27,6 @@
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
@@ -54,7 +53,8 @@
private static final long serialVersionUID = -1L;
private static Logger logger;
private Attributes attributes;
- @ManagedProperty(value = "#{model.capitals}")
+// temporary fix because of a bug in MyFaces
+// @ManagedProperty(value = "#{model.capitals}")
private List<Capital> capitals;
private List<SelectItem> capitalsOptions = null;
private List<SelectItem> validationOptions = null;
@@ -73,7 +73,9 @@
capitalsOptions = new ArrayList<SelectItem>();
validationOptions = new ArrayList<SelectItem>();
- for (Capital capital : capitals) {
+// temporary fix because of a bug in MyFaces
+// for (Capital capital : capitals) {
+ for (Capital capital : Model.unmarshallCapitals()) {
capitalsOptions.add(new SelectItem(capital.getState(), capital.getState()));
validationOptions.add(new SelectItem(capital.getState(),
capital.getState()));
}
Show replies by date