You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2006/01/10 02:27:58 UTC
svn commit: r367455 -
/myfaces/api/trunk/api/src/main/java/javax/faces/component/UISelectItem.java
Author: skitching
Date: Mon Jan 9 17:27:54 2006
New Revision: 367455
URL: http://svn.apache.org/viewcvs?rev=367455&view=rev
Log:
Added javadoc only.
Modified:
myfaces/api/trunk/api/src/main/java/javax/faces/component/UISelectItem.java
Modified: myfaces/api/trunk/api/src/main/java/javax/faces/component/UISelectItem.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/api/src/main/java/javax/faces/component/UISelectItem.java?rev=367455&r1=367454&r2=367455&view=diff
==============================================================================
--- myfaces/api/trunk/api/src/main/java/javax/faces/component/UISelectItem.java (original)
+++ myfaces/api/trunk/api/src/main/java/javax/faces/component/UISelectItem.java Mon Jan 9 17:27:54 2006
@@ -19,7 +19,17 @@
import javax.faces.el.ValueBinding;
/**
- * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
+ * A component representing a single option that the user can choose.
+ * <p>
+ * The option attributes can either be defined directly on this component
+ * (via the itemValue, itemLabel, itemDescription properties) or the value
+ * property can reference a SelectItem object (directly or via an EL expression).
+ * <p>
+ * The value expression (if defined) is read-only; the parent select component
+ * will have a value attribute specifying where the value for the chosen
+ * selection will be stored.
+ *
+ * See Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/index.html">JSF Specification</a>
*
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
@@ -53,6 +63,11 @@
_itemDescription = itemDescription;
}
+ /**
+ * For use in development tools.
+ * <p>
+ * Q: what use is an EL expression for this???
+ */
public String getItemDescription()
{
if (_itemDescription != null) return _itemDescription;
@@ -60,11 +75,19 @@
return vb != null ? _ComponentUtils.getStringValue(getFacesContext(), vb) : null;
}
+ /**
+ * When true, this item cannot be chosen by the user. If this method is
+ * ever called, then any EL-binding for the disabled property will be
+ * ignored.
+ */
public void setItemDisabled(boolean itemDisabled)
{
_itemDisabled = Boolean.valueOf(itemDisabled);
}
+ /**
+ * Determine whether this item can be chosen by the user.
+ */
public boolean isItemDisabled()
{
if (_itemDisabled != null) return _itemDisabled.booleanValue();
@@ -78,6 +101,9 @@
_itemLabel = itemLabel;
}
+ /**
+ * Get the string which will be presented to the user for this option.
+ */
public String getItemLabel()
{
if (_itemLabel != null) return _itemLabel;