isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1354647 - /incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
Date Wed, 27 Jun 2012 17:59:09 GMT
Author: rmatthews
Date: Wed Jun 27 17:59:08 2012
New Revision: 1354647

URL: http://svn.apache.org/viewvc?rev=1354647&view=rev
Log:
ISIS-162 - When target object not specified then the OID for the default object was not being
passed through

Modified:
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java?rev=1354647&r1=1354646&r2=1354647&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
(original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
Wed Jun 27 17:59:08 2012
@@ -25,6 +25,7 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.viewer.scimpi.dispatcher.AbstractElementProcessor;
 import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext;
+import org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.Scope;
 import org.apache.isis.viewer.scimpi.dispatcher.processor.Request;
 import org.apache.isis.viewer.scimpi.dispatcher.util.MethodsUtils;
 import org.apache.isis.viewer.scimpi.dispatcher.view.HelpLink;
@@ -33,7 +34,7 @@ public class ActionLink extends Abstract
 
     @Override
     public void process(final Request request) {
-        final String objectId = request.getOptionalProperty(OBJECT);
+        String objectId = request.getOptionalProperty(OBJECT);
         final String method = request.getOptionalProperty(METHOD);
         final String forwardResultTo = request.getOptionalProperty(VIEW);
         final String forwardVoidTo = request.getOptionalProperty(VOID);
@@ -55,8 +56,10 @@ public class ActionLink extends Abstract
         final ObjectAdapter object = MethodsUtils.findObject(context, objectId);
         final String version = context.mapVersion(object);
         final ObjectAction action = MethodsUtils.findAction(object, method);
+        objectId = request.getContext().mapObject(object, Scope.REQUEST);
 
         final ActionContent parameterBlock = new ActionContent(action);
+        
         request.setBlockContent(parameterBlock);
         request.pushNewBuffer();
         request.processUtilCloseTag();



Mime
View raw message