You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2014/02/27 16:24:25 UTC

[2/2] git commit: ISIS-718: actions that return URL now opened via browser

ISIS-718: actions that return URL now opened via browser

Specifically:
- if no-arg action on object (eg ToDoItem#openSourceCodeOnGithub in example todo app)
- if action that takes args (eg ExternalLinksService#goToDocs in example todo app)

In addition:
- minor fix to CSS for Internet Explorer (fix height for td's with div's)
- border on right hand side of tables as well as left
- make table cells rendered as disabled input fields have same height as that of labels (eg integer panel)


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/3dcfb2fc
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/3dcfb2fc
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/3dcfb2fc

Branch: refs/heads/master
Commit: 3dcfb2fcd61636ff2fac66a3c7c54a500fdf2c6a
Parents: 39e34b9
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Thu Feb 27 15:24:13 2014 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Thu Feb 27 15:24:13 2014 +0000

----------------------------------------------------------------------
 .../ui/actionresponse/ActionResultResponse.java |  62 ++++++++---
 .../ActionResultResponseHandlingStrategy.java   |  34 ++++--
 .../ActionResultResponseType.java               | 103 +++++++++++--------
 .../ui/components/actions/ActionPanel.java      |  30 ++++--
 .../ajaxtable/BulkActionsLinkFactory.java       |   6 +-
 .../CollectionContentsAsAjaxTablePanel.css      |   8 ++
 .../cssmenu/ActionLinkFactoryAbstract.java      |  13 +++
 .../widgets/cssmenu/AjaxDeferredBehaviour.java  |   8 +-
 .../widgets/cssmenu/AjaxDownload.java           |  69 -------------
 .../widgets/cssmenu/AjaxRedirect.java           |  57 ----------
 .../viewer/wicket/ui/pages/PageAbstract.css     |   1 +
 .../ui/pages/jquery.isis.wicket.viewer.js       |   5 +
 12 files changed, 188 insertions(+), 208 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponse.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponse.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponse.java
index 219fa75..2225115 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponse.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponse.java
@@ -16,6 +16,9 @@
  */
 package org.apache.isis.viewer.wicket.ui.actionresponse;
 
+import java.net.URL;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.request.IRequestHandler;
 
 import org.apache.isis.viewer.wicket.ui.pages.PageAbstract;
@@ -26,33 +29,64 @@ import org.apache.isis.viewer.wicket.ui.pages.PageAbstract;
  * handler (eg a download).
  */
 public class ActionResultResponse {
-    private final ActionResultResponseType resultType;
+    
+    private final ActionResultResponseHandlingStrategy handlingStrategy;
     private final IRequestHandler handler;
     private final PageAbstract page;
-    public static ActionResultResponse withHandler(ActionResultResponseType resultType, IRequestHandler handler) {
-        return new ActionResultResponse(resultType, handler, null);
+    private AjaxRequestTarget target;
+    private URL url;
+    
+    public static ActionResultResponse withHandler(IRequestHandler handler) {
+        return new ActionResultResponse(
+                ActionResultResponseHandlingStrategy.SCHEDULE_HANDLER, handler, null, null, null);
+    }
+    public static ActionResultResponse toPage(PageAbstract page) {
+        return new ActionResultResponse(
+                ActionResultResponseHandlingStrategy.REDIRECT_TO_PAGE, null, page, null, null);
     }
-    public static ActionResultResponse toPage(ActionResultResponseType resultType, PageAbstract page) {
-        return new ActionResultResponse(resultType, null, page);
+    public static ActionResultResponse openUrlInBrowser(final AjaxRequestTarget target, final URL url) {
+        return new ActionResultResponse(
+                ActionResultResponseHandlingStrategy.OPEN_URL_IN_BROWSER, null, null, target, url);
     }
-    private ActionResultResponse(ActionResultResponseType resultType, IRequestHandler handler, PageAbstract page) {
-        this.resultType = resultType;
+    private ActionResultResponse(
+            final ActionResultResponseHandlingStrategy strategy, 
+            final IRequestHandler handler, 
+            final PageAbstract page, 
+            final AjaxRequestTarget target,
+            final URL url) {
+        handlingStrategy = strategy;
         this.handler = handler;
         this.page = page;
+        this.target = target;
+        this.url = url;
     }
-    public boolean isRedirect() {
-        return handler != null;
-    }
-    public boolean isToPage() {
-        return page != null;
+
+    public ActionResultResponseHandlingStrategy getHandlingStrategy() {
+        return handlingStrategy;
     }
+
+    /**
+     * Populated only if {@link #getHandlingStrategy() handling strategy} is {@link ActionResultResponseHandlingStrategy#SCHEDULE_HANDLER}
+     */
     public IRequestHandler getHandler() {
         return handler;
     }
+    /**
+     * Populated only if {@link #getHandlingStrategy() handling strategy} is {@link ActionResultResponseHandlingStrategy#REDIRECT_TO_PAGE}
+     */
     public PageAbstract getToPage() {
         return page;
     }
-    public ActionResultResponseType getResultType() {
-        return resultType;
+    /**
+     * Populated only if {@link #getHandlingStrategy() handling strategy} is {@link ActionResultResponseHandlingStrategy#OPEN_URL_IN_BROWSER}
+     */
+    public AjaxRequestTarget getTarget() {
+        return target;
+    }
+    /**
+     * Populated only if {@link #getHandlingStrategy() handling strategy} is {@link ActionResultResponseHandlingStrategy#OPEN_URL_IN_BROWSER}
+     */
+    public URL getUrl() {
+        return url;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseHandlingStrategy.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseHandlingStrategy.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseHandlingStrategy.java
index 5ad6ab5..149a6a4 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseHandlingStrategy.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseHandlingStrategy.java
@@ -16,12 +16,24 @@
  */
 package org.apache.isis.viewer.wicket.ui.actionresponse;
 
+import java.net.URL;
+
 import org.apache.wicket.Component;
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.request.Url;
 import org.apache.wicket.request.cycle.RequestCycle;
 
 import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.viewer.wicket.model.models.VoidModel;
+import org.apache.isis.viewer.wicket.ui.pages.voidreturn.VoidReturnPage;
 
 public enum ActionResultResponseHandlingStrategy {
+    REDIRECT_TO_VOID {
+        @Override
+        public void handleResults(Component component, ActionResultResponse resultResponse) {
+            component.setResponsePage(new VoidReturnPage(new VoidModel()));
+        }
+    },
     REDIRECT_TO_PAGE {
         @Override
         public void handleResults(final Component component, final ActionResultResponse resultResponse) {
@@ -40,15 +52,21 @@ public enum ActionResultResponseHandlingStrategy {
             RequestCycle requestCycle = component.getRequestCycle();
             requestCycle.scheduleRequestHandlerAfterCurrent(resultResponse.getHandler());
         }
+    },
+    OPEN_URL_IN_BROWSER {
+        @Override
+        public void handleResults(final Component component, final ActionResultResponse resultResponse) {
+            final AjaxRequestTarget target = resultResponse.getTarget();
+            final URL url = resultResponse.getUrl();
+            
+            String urlStr = url.toString();
+            urlStr = urlStr + (urlStr.contains("?") ? "&" : "?");
+            urlStr = urlStr + "antiCache=" + System.currentTimeMillis();
+
+            final String fullUrl = component.getRequestCycle().getUrlRenderer().renderFullUrl(Url.parse(urlStr));
+            target.appendJavaScript("setTimeout(function(){isisOpenInNewTab('" + fullUrl + "')}, 100);");
+        }
     };
 
     public abstract void handleResults(Component component, ActionResultResponse resultResponse);
-
-    public static ActionResultResponseHandlingStrategy determineFor(final ActionResultResponse resultResponse) {
-        if(resultResponse.isToPage()) {
-            return REDIRECT_TO_PAGE;
-        } else {
-            return SCHEDULE_HANDLER;
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
index 9e5b5af..35c5dce 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/actionresponse/ActionResultResponseType.java
@@ -16,12 +16,16 @@
  */
 package org.apache.isis.viewer.wicket.ui.actionresponse;
 
+import java.net.URL;
 import java.util.Collection;
 import java.util.List;
 
 import com.google.common.collect.Lists;
 
+import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.request.IRequestHandler;
+import org.apache.wicket.request.Url;
+import org.apache.wicket.request.cycle.RequestCycle;
 
 import org.apache.isis.applib.value.Blob;
 import org.apache.isis.applib.value.Clob;
@@ -42,7 +46,7 @@ import org.apache.isis.viewer.wicket.ui.pages.voidreturn.VoidReturnPage;
 public enum ActionResultResponseType {
     OBJECT {
         @Override
-        public ActionResultResponse interpretResult(final ActionModel model, final ObjectAdapter resultAdapter) {
+        public ActionResultResponse interpretResult(final ActionModel model, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
             final ObjectAdapter actualAdapter = determineActualAdapter(resultAdapter);
             return toEntityPage(model, actualAdapter, null);
         }
@@ -51,81 +55,67 @@ public enum ActionResultResponseType {
         public ActionResultResponse interpretResult(final ActionModel model, ObjectAdapter targetAdapter, ConcurrencyException ex) {
             return toEntityPage(model, targetAdapter, ex);
         }
-
-        private ObjectAdapter determineActualAdapter(final ObjectAdapter resultAdapter) {
-            if (resultAdapter.getSpecification().isNotCollection()) {
-                return resultAdapter;
-            } else {
-                // will only be a single element
-                final List<Object> pojoList = asList(resultAdapter);
-                final Object pojo = pojoList.get(0);
-                return adapterFor(pojo);
-            }
-        }
-        private ObjectAdapter adapterFor(final Object pojo) {
-            return IsisContext.getPersistenceSession().getAdapterManager().adapterFor(pojo);
-        }
-
-        private ActionResultResponse toEntityPage(final ActionModel model, final ObjectAdapter actualAdapter, ConcurrencyException exIfAny) {
-            // this will not preserve the URL (because pageParameters are not copied over)
-            // but trying to preserve them seems to cause the 302 redirect to be swallowed somehow
-            final EntityPage entityPage = new EntityPage(actualAdapter, exIfAny);
-            return ActionResultResponse.toPage(this, entityPage);
-        }
-
     },
     COLLECTION {
         @Override
-        public ActionResultResponse interpretResult(final ActionModel actionModel, final ObjectAdapter resultAdapter) {
+        public ActionResultResponse interpretResult(final ActionModel actionModel, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
             final EntityCollectionModel collectionModel = EntityCollectionModel.createStandalone(resultAdapter);
             collectionModel.setActionHint(actionModel);
-            return ActionResultResponse.toPage(this, new StandaloneCollectionPage(collectionModel));
+            return ActionResultResponse.toPage(new StandaloneCollectionPage(collectionModel));
         }
     },
     VALUE {
         @Override
-        public ActionResultResponse interpretResult(final ActionModel model, final ObjectAdapter resultAdapter) {
+        public ActionResultResponse interpretResult(final ActionModel model, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
             ValueModel valueModel = new ValueModel(resultAdapter);
             final ValuePage valuePage = new ValuePage(valueModel);
-            return ActionResultResponse.toPage(this, valuePage);
+            return ActionResultResponse.toPage(valuePage);
         }
     },
     VALUE_CLOB {
         @Override
-        public ActionResultResponse interpretResult(final ActionModel model, final ObjectAdapter resultAdapter) {
+        public ActionResultResponse interpretResult(final ActionModel model, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
             final Object value = resultAdapter.getObject();
             IRequestHandler handler = ActionModel.downloadHandler(value);
-            return ActionResultResponse.withHandler(this, handler);
+            return ActionResultResponse.withHandler(handler);
         }
     },
     VALUE_BLOB {
         @Override
-        public ActionResultResponse interpretResult(final ActionModel model, final ObjectAdapter resultAdapter) {
+        public ActionResultResponse interpretResult(final ActionModel model, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
             final Object value = resultAdapter.getObject();
             IRequestHandler handler = ActionModel.downloadHandler(value);
-            return ActionResultResponse.withHandler(this, handler);
+            return ActionResultResponse.withHandler(handler);
+        }
+    },
+    VALUE_URL_AJAX {
+        @Override
+        public ActionResultResponse interpretResult(final ActionModel model, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
+            final URL url = (URL)resultAdapter.getObject();
+            return ActionResultResponse.openUrlInBrowser(target, url);
         }
 
     },
-    VALUE_URL {
+    VALUE_URL_NOAJAX {
         @Override
-        public ActionResultResponse interpretResult(final ActionModel model, final ObjectAdapter resultAdapter) {
+        public ActionResultResponse interpretResult(final ActionModel model, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
+            // open URL server-side redirect
             final Object value = resultAdapter.getObject();
             IRequestHandler handler = ActionModel.redirectHandler(value);
-            return ActionResultResponse.withHandler(this, handler);
+            return ActionResultResponse.withHandler(handler);
         }
-
+        
     },
     VOID {
         @Override
-        public ActionResultResponse interpretResult(final ActionModel model, final ObjectAdapter resultAdapter) {
+        public ActionResultResponse interpretResult(final ActionModel model, final AjaxRequestTarget target, final ObjectAdapter resultAdapter) {
             final VoidModel voidModel = new VoidModel();
             voidModel.setActionHint(model);
-            return ActionResultResponse.toPage(this, new VoidReturnPage(voidModel));
+            return ActionResultResponse.toPage(new VoidReturnPage(voidModel));
         }
     };
 
-    public abstract ActionResultResponse interpretResult(ActionModel model, ObjectAdapter resultAdapter);
+    public abstract ActionResultResponse interpretResult(ActionModel model, final AjaxRequestTarget target, ObjectAdapter resultAdapter);
 
     /**
      * Only overridden for {@link ActionResultResponseType#OBJECT object}
@@ -134,14 +124,41 @@ public enum ActionResultResponseType {
         throw new UnsupportedOperationException("Cannot render concurrency exception for any result type other than OBJECT");
     }
 
+    private static ObjectAdapter determineActualAdapter(final ObjectAdapter resultAdapter) {
+        if (resultAdapter.getSpecification().isNotCollection()) {
+            return resultAdapter;
+        } else {
+            // will only be a single element
+            final List<Object> pojoList = asList(resultAdapter);
+            final Object pojo = pojoList.get(0);
+            return adapterFor(pojo);
+        }
+    }
+    private static ObjectAdapter adapterFor(final Object pojo) {
+        return IsisContext.getPersistenceSession().getAdapterManager().adapterFor(pojo);
+    }
+
+    private static ActionResultResponse toEntityPage(final ActionModel model, final ObjectAdapter actualAdapter, ConcurrencyException exIfAny) {
+        // this will not preserve the URL (because pageParameters are not copied over)
+        // but trying to preserve them seems to cause the 302 redirect to be swallowed somehow
+        final EntityPage entityPage = new EntityPage(actualAdapter, exIfAny);
+        return ActionResultResponse.toPage(entityPage);
+    }
+
+
     // //////////////////////////////////////
 
-    public static ActionResultResponse determineAndInterpretResult(final ActionModel model, ObjectAdapter resultAdapter) {
-        ActionResultResponseType arrt = determineFor(resultAdapter);
-        return arrt.interpretResult(model, resultAdapter);
+    public static ActionResultResponse determineAndInterpretResult(
+            final ActionModel model, 
+            final AjaxRequestTarget target, 
+            final ObjectAdapter resultAdapter) {
+        ActionResultResponseType arrt = determineFor(resultAdapter, target);
+        return arrt.interpretResult(model, target, resultAdapter);
     }
 
-    private static ActionResultResponseType determineFor(final ObjectAdapter resultAdapter) {
+    private static ActionResultResponseType determineFor(
+            final ObjectAdapter resultAdapter, 
+            final AjaxRequestTarget target) {
         if(resultAdapter == null) {
             return ActionResultResponseType.VOID;
         }
@@ -157,7 +174,7 @@ public enum ActionResultResponseType {
                     return ActionResultResponseType.VALUE_BLOB;
                 } 
                 if(value instanceof java.net.URL) {
-                    return ActionResultResponseType.VALUE_URL;
+                    return target != null? ActionResultResponseType.VALUE_URL_AJAX: ActionResultResponseType.VALUE_URL_NOAJAX;
                 } 
                 // else
                 return ActionResultResponseType.VALUE;

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
index 14511e8..5390904 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java
@@ -42,6 +42,7 @@ import org.apache.isis.core.runtime.system.context.IsisContext;
 import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
 import org.apache.isis.viewer.wicket.model.models.ActionExecutor;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
+import org.apache.isis.viewer.wicket.model.models.ActionPrompt;
 import org.apache.isis.viewer.wicket.model.models.BookmarkableModel;
 import org.apache.isis.viewer.wicket.model.models.BookmarkedPagesModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
@@ -69,12 +70,22 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
 
     static final String ID_ACTION_NAME = "actionName";
 
+    private ActionPrompt actionPrompt;
+
     public ActionPanel(final String id, final ActionModel actionModel) {
         super(id, actionModel);
         actionModel.setExecutor(this);
         buildGui(actionModel);
     }
 
+    /**
+     * Sets the owning action prompt (modal window), if any.
+     */
+    public void setActionPrompt(ActionPrompt actionPrompt) {
+        this.actionPrompt = actionPrompt;
+    }
+
+
     private void buildGui(final ActionModel actionModel) {
         if (actionModel.hasParameters()) {
             buildGuiForParameters(actionModel);
@@ -110,7 +121,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
             
             // forward onto the target page with the concurrency exception
             ActionResultResponse resultResponse = ActionResultResponseType.OBJECT.interpretResult(this.getActionModel(), targetAdapter, ex);
-            ActionResultResponseHandlingStrategy.determineFor(resultResponse).handleResults(this, resultResponse);
+            resultResponse.getHandlingStrategy().handleResults(this, resultResponse);
 
             getMessageBroker().addWarning(ex.getMessage());
         }
@@ -152,7 +163,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
 
             // forward onto the target page with the concurrency exception
             ActionResultResponse resultResponse = ActionResultResponseType.OBJECT.interpretResult(this.getActionModel(), targetAdapter, ex);
-            ActionResultResponseHandlingStrategy.determineFor(resultResponse).handleResults(this, resultResponse);
+            resultResponse.getHandlingStrategy().handleResults(this, resultResponse);
 
             getMessageBroker().addWarning(ex.getMessage());
             return false;
@@ -198,14 +209,18 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
             // will be thrown here
             getTransactionManager().flushTransaction();
             
-            ActionResultResponse resultResponse = ActionResultResponseType.determineAndInterpretResult(this.getActionModel(), resultAdapter);
-            final ActionResultResponseHandlingStrategy responseHandlingStrategy = 
-                    ActionResultResponseHandlingStrategy.determineFor(resultResponse);
-            responseHandlingStrategy.handleResults(this, resultResponse);
+            ActionResultResponse resultResponse = ActionResultResponseType.determineAndInterpretResult(this.getActionModel(), target, resultAdapter);
+            resultResponse.getHandlingStrategy().handleResults(this, resultResponse);
 
             if (actionModel.isBookmarkable()) {
                 bookmarkPage(actionModel);
             }
+            
+            if(actionPrompt != null) {
+                actionPrompt.close(target);
+                // cos will be reused next time, so mustn't cache em.
+                actionModel.clearArguments();
+            }
 
             return true;
 
@@ -220,8 +235,7 @@ public class ActionPanel extends PanelAbstract<ActionModel> implements ActionExe
                     // forward on instead to void page
                     // (otherwise, we'll have rendered an action parameters page 
                     // and so we'll be staying on that page)
-                    final ActionResultResponseHandlingStrategy resultType = ActionResultResponseHandlingStrategy.determineFor(null);
-                    resultType.handleResults(this, null);
+                    ActionResultResponseHandlingStrategy.REDIRECT_TO_VOID.handleResults(this, null);
                 }
 
                 return false;

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkActionsLinkFactory.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkActionsLinkFactory.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkActionsLinkFactory.java
index 4ad4973..a7e55f5 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkActionsLinkFactory.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkActionsLinkFactory.java
@@ -132,10 +132,8 @@ final class BulkActionsLinkFactory implements ActionLinkFactory {
                     
                     if(lastReturnedAdapter != null) {
                         final ActionResultResponse resultResponse = 
-                                ActionResultResponseType.determineAndInterpretResult(actionModelHint, lastReturnedAdapter);
-                        final ActionResultResponseHandlingStrategy responseHandlingStrategy = 
-                                ActionResultResponseHandlingStrategy.determineFor(resultResponse);
-                        responseHandlingStrategy.handleResults(this, resultResponse);
+                                ActionResultResponseType.determineAndInterpretResult(actionModelHint, null, lastReturnedAdapter);
+                        resultResponse.getHandlingStrategy().handleResults(this, resultResponse);
                     }
 
                 } catch(final ConcurrencyException ex) {

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.css
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.css b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.css
index 37acdbe..acd521f 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.css
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTablePanel.css
@@ -200,3 +200,11 @@
 .collectionContentsAsAjaxTablePanel label:hover {
 	cursor: default;
 }
+
+.collectionContentsAsAjaxTablePanel td div {
+    display: table-cell;
+}
+
+.collectionContentsAsAjaxTablePanel div input[type=text][disabled] {
+    padding: 0px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/ActionLinkFactoryAbstract.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/ActionLinkFactoryAbstract.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/ActionLinkFactoryAbstract.java
index bb3803d..71208bf 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/ActionLinkFactoryAbstract.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/ActionLinkFactoryAbstract.java
@@ -106,6 +106,7 @@ public abstract class ActionLinkFactoryAbstract implements ActionLinkFactory {
                                         ComponentType.ACTION_PROMPT, actionPrompt.getContentId(), actionModel);
                         
                         actionPrompt.setPanel(actionPromptPanel, target);
+                        actionPromptPanel.setActionPrompt(actionPrompt);
                         actionPrompt.show(target);
                         
                         target.focusComponent(actionPromptPanel);
@@ -140,7 +141,12 @@ public abstract class ActionLinkFactoryAbstract implements ActionLinkFactory {
     }
 
     private static AjaxDeferredBehaviour determineDeferredBehaviour(final ObjectAction action, final ActionModel actionModel) {
+        // TODO: should unify with ActionResultResponseType (as used in ActionPanel)
         if(isNoArgReturnTypeRedirect(action)) {
+            /**
+             * adapted from:
+             * @see https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
+             */
             return new AjaxDeferredBehaviour() {
                 
                 private static final long serialVersionUID = 1L;
@@ -154,6 +160,11 @@ public abstract class ActionLinkFactoryAbstract implements ActionLinkFactory {
             };
         } 
         if(isNoArgReturnTypeDownload(action)) {
+
+            /**
+             * adapted from:
+             * @see https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
+             */
             return new AjaxDeferredBehaviour() {
                 
                 private static final long serialVersionUID = 1L;
@@ -169,12 +180,14 @@ public abstract class ActionLinkFactoryAbstract implements ActionLinkFactory {
         return null;
     }
 
+    // TODO: should unify with ActionResultResponseType (as used in ActionPanel)
     private static boolean isNoArgReturnTypeRedirect(final ObjectAction action) {
         return action.getParameterCount() == 0 &&
                action.getReturnType() != null && 
                action.getReturnType().getCorrespondingClass() == java.net.URL.class;
     }
 
+    // TODO: should unify with ActionResultResponseType (as used in ActionPanel)
     private static boolean isNoArgReturnTypeDownload(final ObjectAction action) {
         return action.getParameterCount() == 0 && action.getReturnType() != null && 
                 (action.getReturnType().getCorrespondingClass() == org.apache.isis.applib.value.Blob.class ||

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDeferredBehaviour.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDeferredBehaviour.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDeferredBehaviour.java
index 9ce9e80..739f451 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDeferredBehaviour.java
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDeferredBehaviour.java
@@ -22,10 +22,7 @@ package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.behavior.AbstractAjaxBehavior;
 import org.apache.wicket.request.IRequestHandler;
-import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
-import org.apache.wicket.request.http.handler.RedirectRequestHandler;
-import org.apache.wicket.request.resource.ContentDisposition;
-import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.request.Url;
 
 public abstract class AjaxDeferredBehaviour extends AbstractAjaxBehavior {
     private static final long serialVersionUID = 1L;
@@ -56,7 +53,8 @@ public abstract class AjaxDeferredBehaviour extends AbstractAjaxBehavior {
     }
 
     protected String javascriptFor(String url) {
-        return "setTimeout(\"window.location.href='" + url + "'\", 100);";
+        String fullUrl = getComponent().getRequestCycle().getUrlRenderer().renderFullUrl(Url.parse(url));
+        return "setTimeout(function(){isisOpenInNewTab('" + fullUrl + "')}, 100);";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDownload.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDownload.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDownload.java
deleted file mode 100644
index 3a9e7c4..0000000
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxDownload.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
-
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.behavior.AbstractAjaxBehavior;
-import org.apache.wicket.request.IRequestHandler;
-import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler;
-import org.apache.wicket.request.resource.ContentDisposition;
-import org.apache.wicket.util.resource.IResourceStream;
-
-/**
- * @see https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
- * 
- * @author Sven Meier
- * @author Ernesto Reinaldo Barreiro (reiern70@gmail.com)
- * @author Jordi Deu-Pons (jordi@jordeu.net)
- */
-public abstract class AjaxDownload extends AjaxDeferredBehaviour {
-
-    private static final long serialVersionUID = 1L;
-
-    public AjaxDownload() {
-        super();
-    }
-
-    public AjaxDownload(boolean addAntiCache) {
-        super(addAntiCache);
-    }
-
-    @Override
-    protected IRequestHandler getRequestHandler() {
-        ResourceStreamRequestHandler handler = new ResourceStreamRequestHandler(getResourceStream(), getFileName());
-        handler.setContentDisposition(ContentDisposition.ATTACHMENT);
-        return handler;
-    }
-
-    /**
-     * Override this method for a file name which will let the browser prompt
-     * with a save/open dialog.
-     * 
-     * @see ResourceStreamRequestTarget#getFileName()
-     */
-    protected String getFileName() {
-        return null;
-    }
-
-    /**
-     * Hook method providing the actual resource stream.
-     */
-    protected abstract IResourceStream getResourceStream();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxRedirect.java
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxRedirect.java b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxRedirect.java
deleted file mode 100644
index f3d4ae8..0000000
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/AjaxRedirect.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu;
-
-import java.net.URL;
-
-import org.apache.wicket.request.IRequestHandler;
-import org.apache.wicket.request.http.handler.RedirectRequestHandler;
-
-/**
- * @see https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow
- * 
- * @author Sven Meier
- * @author Ernesto Reinaldo Barreiro (reiern70@gmail.com)
- * @author Jordi Deu-Pons (jordi@jordeu.net)
- */
-public abstract class AjaxRedirect extends AjaxDeferredBehaviour {
-
-    private static final long serialVersionUID = 1L;
-
-    public AjaxRedirect() {
-        super();
-    }
-
-    public AjaxRedirect(boolean addAntiCache) {
-        super(addAntiCache);
-    }
-
-    @Override
-    protected IRequestHandler getRequestHandler() {
-        final java.net.URL url = getRedirectUrl();
-        IRequestHandler handler = new RedirectRequestHandler(url.toString());
-        return handler;
-    }
-
-    /**
-     * Hook method providing the actual URL.
-     */
-    protected abstract URL getRedirectUrl();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
index 8d0cf78..d5917e5 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
@@ -576,6 +576,7 @@ tr.section td {
 table.contents td,
 table.contents th {
 	border-left: 1px solid #DDD;
+	border-right: 1px solid #DDD;
 }
 
 /*************** Styling Entity Forms and Parameters ********************/

http://git-wip-us.apache.org/repos/asf/isis/blob/3dcfb2fc/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
----------------------------------------------------------------------
diff --git a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
index 8604da7..d994f3d 100644
--- a/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
+++ b/component/viewer/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/jquery.isis.wicket.viewer.js
@@ -42,6 +42,11 @@ $(document).ready(function() {
         }
         $("#veil").stop().hide();
     }
+    
+    isisOpenInNewTab = function(url){
+    	var win=window.open(url, '_blank'); 
+    	if(win) { win.focus(); }
+	}
 
     /* for modal dialogs */
     Wicket.Event.subscribe(