You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2015/03/17 14:46:37 UTC
svn commit: r1667307 -
/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectItem.java
Author: bommel
Date: Tue Mar 17 13:46:36 2015
New Revision: 1667307
URL: http://svn.apache.org/r1667307
Log:
(TOBAGO-1449)
selectOneChoice with selectItem within sheet results in PropertyNotFoundException
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectItem.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectItem.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectItem.java?rev=1667307&r1=1667306&r2=1667307&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectItem.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISelectItem.java Tue Mar 17 13:46:36 2015
@@ -28,20 +28,12 @@ import javax.faces.component.UIComponent
import javax.faces.component.UISelectItem;
import javax.faces.context.FacesContext;
-public class AbstractUISelectItem extends UISelectItem implements OnComponentPopulated {
+public class AbstractUISelectItem extends UISelectItem {
private static final Logger LOG = LoggerFactory.getLogger(AbstractUISelectItem.class);
private boolean itemValueLiteral;
- public void onComponentPopulated(final FacesContext facesContext, final UIComponent parent) {
- if (itemValueLiteral) {
- final Object converted = ComponentUtils.getConvertedValue(
- FacesContext.getCurrentInstance(), parent, (String) getItemValue());
- super.setItemValue(converted);
- }
- }
-
@Override
public void setItemValue(final Object itemValue) {
if (itemValue instanceof String) {
@@ -54,4 +46,15 @@ public class AbstractUISelectItem extend
}
super.setItemValue(itemValue);
}
+
+ @Override
+ public Object getItemValue() {
+ if (itemValueLiteral) {
+ final Object converted = ComponentUtils.getConvertedValue(
+ FacesContext.getCurrentInstance(), getParent(), (String) super.getItemValue());
+ return converted;
+ } else {
+ return super.getItemValue();
+ }
+ }
}