myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r378105 - /myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java
Date Wed, 15 Feb 2006 22:24:40 GMT
Author: matzew
Date: Wed Feb 15 14:24:37 2006
New Revision: 378105

URL: http://svn.apache.org/viewcvs?rev=378105&view=rev
Log:
using constants for MB signatures

Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java?rev=378105&r1=378104&r2=378105&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/InputSuggestAjaxTag.java
Wed Feb 15 14:24:37 2006
@@ -33,6 +33,10 @@
 
 public class InputSuggestAjaxTag extends HtmlInputTextTag
 {
+	private final static Class[] DEFAULT_SIGNATURE = new Class[]{String.class};
+	private final static Class[] SUGGEST_ITEM_SIGNATURE = new Class[]{String.class, Integer.class};
+	
+	
     private static Log log = LogFactory.getLog(InputSuggestAjaxTag.class);
 
     private String _suggestedItemsMethod;
@@ -107,10 +111,10 @@
             if (isValueReference(suggestedItemsMethod))
             {
             	if (((InputSuggestAjax)component).getMaxSuggestedItems()!=null) {
-                    MethodBinding mb = context.getApplication().createMethodBinding(suggestedItemsMethod,new
Class[]{String.class, Integer.class});
+                    MethodBinding mb = context.getApplication().createMethodBinding(suggestedItemsMethod,
SUGGEST_ITEM_SIGNATURE);
                     ((InputSuggestAjax)component).setSuggestedItemsMethod(mb);
             	} else {
-                    MethodBinding mb = context.getApplication().createMethodBinding(suggestedItemsMethod,new
Class[]{String.class});
+                    MethodBinding mb = context.getApplication().createMethodBinding(suggestedItemsMethod,
DEFAULT_SIGNATURE);
                     ((InputSuggestAjax)component).setSuggestedItemsMethod(mb);
             	}
             	



Mime
View raw message