incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1300378 - /incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
Date Tue, 13 Mar 2012 22:05:30 GMT
Author: danhaywood
Date: Tue Mar 13 22:05:30 2012
New Revision: 1300378

URL: http://svn.apache.org/viewvc?rev=1300378&view=rev
Log:
ISIS-213: partial fix; only guesses a value for objects, never for scalars.  Really, we need
a more robust way of modelling contributed actions, so that we know which parameter is the
contributee.

Modified:
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java

Modified: incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java?rev=1300378&r1=1300377&r2=1300378&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
(original)
+++ incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/MethodTask.java
Tue Mar 13 22:05:30 2012
@@ -57,7 +57,7 @@ public final class MethodTask extends Ta
             }
 
         }
-
+        
         // String[] names = action.getParameterNames();
         // String[] descriptions = action.getParameterDescriptions();
         // ObjectSpecification[] types = action.getParameterTypes();
@@ -68,9 +68,11 @@ public final class MethodTask extends Ta
             // this.descriptions[i] = descriptions[i];
             // this.fieldSpecifications[i] = types[i];
             // this.optional[i] = optional[i];
-            if (defaultParameterValues[i] == null) {
-                // TODO use new promptForParameters method instead of all this
-                if (action.isContributed()) {
+
+        	if (defaultParameterValues[i] == null) {
+
+        		// TODO: review; this isn't sufficient, because could provide an invalid value
for a reference type, I think?
+                if (action.isContributed() && parameters.get(i).isObject()) {
                     initialState[i] = target;
                 } else {
                     initialState[i] = null;



Mime
View raw message