You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2004/12/07 22:33:31 UTC
cvs commit: incubator-myfaces/src/jsfapi/javax/faces/component UISelectMany.java
matzew 2004/12/07 13:33:31
Modified: src/jsfapi/javax/faces/component UISelectMany.java
Log:
closing MYFACES-6, thanks to Heath Borders-Wing for patching it!
Revision Changes Path
1.13 +10 -6 incubator-myfaces/src/jsfapi/javax/faces/component/UISelectMany.java
Index: UISelectMany.java
===================================================================
RCS file: /home/cvs/incubator-myfaces/src/jsfapi/javax/faces/component/UISelectMany.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- UISelectMany.java 1 Jul 2004 22:00:50 -0000 1.12
+++ UISelectMany.java 7 Dec 2004 21:33:31 -0000 1.13
@@ -30,6 +30,9 @@
* @author Manfred Geiler (latest modification by $Author$)
* @version $Revision$ $Date$
* $Log$
+ * Revision 1.13 2004/12/07 21:33:31 matzew
+ * closing MYFACES-6, thanks to Heath Borders-Wing for patching it!
+ *
* Revision 1.12 2004/07/01 22:00:50 mwessendorf
* ASF switch
*
@@ -247,10 +250,11 @@
Object convertedValue = getConvertedValue(context, submittedValue);
if (!isValid()) return;
- boolean empty = convertedValue == null ||
- (convertedValue instanceof Object[] &&
- ((Object[])convertedValue).length == 0);
- if (isRequired() && empty)
+ boolean empty =
+ convertedValue == null
+ || ((convertedValue instanceof Object[]) && (((Object[]) convertedValue).length == 0))
+ || ((convertedValue instanceof List) && ((List) convertedValue).isEmpty());
+ if (isRequired() && empty)
{
_MessageUtils.addErrorMessage(context, this, REQUIRED_MESSAGE_ID,new Object[]{getId()});
setValid(false);