You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2006/06/22 07:58:44 UTC
svn commit: r416263 -
/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UISelectItem.java
Author: dennisbyrne
Date: Wed Jun 21 22:58:44 2006
New Revision: 416263
URL: http://svn.apache.org/viewvc?rev=416263&view=rev
Log:
added accessors to UISelectItem for @itemEscaped, added attribute in TLD as well
Modified:
myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UISelectItem.java
Modified: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UISelectItem.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UISelectItem.java?rev=416263&r1=416262&r2=416263&view=diff
==============================================================================
--- myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UISelectItem.java (original)
+++ myfaces/core/branches/jsf12/api/src/main/java/javax/faces/component/UISelectItem.java Wed Jun 21 22:58:44 2006
@@ -49,7 +49,7 @@
private Object _itemValue = null;
private Object _value = null;
- private boolean itemEscaped;
+ private Boolean itemEscaped;
public UISelectItem()
{
@@ -140,13 +140,14 @@
public Object saveState(FacesContext context)
{
- Object values[] = new Object[6];
+ Object values[] = new Object[7];
values[0] = super.saveState(context);
values[1] = _itemDescription;
values[2] = _itemDisabled;
values[3] = _itemLabel;
values[4] = _itemValue;
values[5] = _value;
+ values[6] = itemEscaped;
return ((Object) (values));
}
@@ -159,17 +160,21 @@
_itemLabel = (String)values[3];
_itemValue = (Object)values[4];
_value = (Object)values[5];
+ itemEscaped = (Boolean) values[6];
}
//------------------ GENERATED CODE END ---------------------------------------
public boolean isItemEscaped()
{
- throw new UnsupportedOperationException("1.2");
+ if (itemEscaped != null) return itemEscaped.booleanValue();
+ ValueBinding vb = getValueBinding("itemEscaped");
+ Boolean v = vb != null ? (Boolean)vb.getValue(getFacesContext()) : null;
+ return v != null ? v.booleanValue() : Boolean.FALSE;
}
public void setItemEscaped(boolean itemEscaped)
{
- throw new UnsupportedOperationException("1.2");
+ this.itemEscaped = itemEscaped ? Boolean.TRUE : Boolean.FALSE;
}
}