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/02/19 22:20:07 UTC
svn commit: r378957 -
/myfaces/commons/trunk/src/main/java/org/apache/myfaces/taglib/UIComponentTagUtils.java
Author: dennisbyrne
Date: Sun Feb 19 13:20:06 2006
New Revision: 378957
URL: http://svn.apache.org/viewcvs?rev=378957&view=rev
Log:
fixes MYFACES-1127
Modified:
myfaces/commons/trunk/src/main/java/org/apache/myfaces/taglib/UIComponentTagUtils.java
Modified: myfaces/commons/trunk/src/main/java/org/apache/myfaces/taglib/UIComponentTagUtils.java
URL: http://svn.apache.org/viewcvs/myfaces/commons/trunk/src/main/java/org/apache/myfaces/taglib/UIComponentTagUtils.java?rev=378957&r1=378956&r2=378957&view=diff
==============================================================================
--- myfaces/commons/trunk/src/main/java/org/apache/myfaces/taglib/UIComponentTagUtils.java (original)
+++ myfaces/commons/trunk/src/main/java/org/apache/myfaces/taglib/UIComponentTagUtils.java Sun Feb 19 13:20:06 2006
@@ -283,6 +283,14 @@
{
MethodBinding mb = context.getApplication().createMethodBinding(actionListener,
ACTION_LISTENER_ARGS);
+
+ if(! Void.class.equals(mb.getType(context)))
+ {
+ throw new IllegalArgumentException(
+ actionListener +
+ " : Return types for action listeners must be void, see JSF spec. 3.2.1.1");
+ }
+
((ActionSource)component).setActionListener(mb);
}
else
@@ -306,6 +314,14 @@
{
MethodBinding mb = context.getApplication().createMethodBinding(valueChangedListener,
VALUE_LISTENER_ARGS);
+
+ if(! Void.class.equals(mb.getType(context)))
+ {
+ throw new IllegalArgumentException(
+ valueChangedListener +
+ " : Return types for value change listeners must be void, see JSF spec. 3.2.5.1");
+ }
+
((EditableValueHolder)component).setValueChangeListener(mb);
}
else