incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1394681 - in /incubator/isis/trunk/framework/viewer/wicket: wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ wicket-ui/src/main/java/org/apache/isis...
Date Fri, 05 Oct 2012 17:38:53 GMT
Author: danhaywood
Date: Fri Oct  5 17:38:52 2012
New Revision: 1394681

URL: http://svn.apache.org/viewvc?rev=1394681&view=rev
Log:
ISIS-232: actions now positioned alongside collections

* also fixed CSS for rendering of dropdown in action dialogs.

Added:
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActionParameters.java
      - copied, changed from r1394445, incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActions.java
      - copied, changed from r1394445, incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkCollectionsLinkFactory.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/MyAjaxFallbackDefaultDataTable.java
Removed:
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java
Modified:
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.html
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/summary/EntitySummaryPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuBuilder.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ActionModel.java Fri Oct  5 17:38:52 2012
@@ -50,7 +50,7 @@ import org.apache.isis.viewer.wicket.mod
 import org.apache.isis.viewer.wicket.model.mementos.ActionParameterMemento;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.mementos.PageParameterNames;
-import org.apache.isis.viewer.wicket.model.util.ActionParams;
+import org.apache.isis.viewer.wicket.model.util.ObjectActionParameters;
 
 /**
  * Models an action invocation, either the gathering of arguments for the
@@ -189,7 +189,7 @@ public class ActionModel extends Bookmar
         }
         int i = 0;
         for (final ObjectActionParameter actionParam : objectAction.getParameters()) {
-            if (ActionParams.compatibleWith(contextAdapter, actionParam)) {
+            if (ObjectActionParameters.compatibleWith(contextAdapter, actionParam)) {
                 final String oidKeyValue = "" + i + "=" + contextAdapter.getOid().enString(getOidMarshaller());
                 PageParameterNames.ACTION_PARAM_CONTEXT.addStringTo(pageParameters, oidKeyValue);
                 return;

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ClassLoaders.java Fri Oct  5 17:38:52 2012
@@ -32,15 +32,15 @@ public final class ClassLoaders {
     private static Map<String, Class<?>> primitives = Maps.newHashMap();
 
     static {
-        @SuppressWarnings("unchecked")
+        @SuppressWarnings({ "rawtypes" })
         final List<Class> primitiveClasses = Arrays.<Class> asList(boolean.class, byte.class, short.class, int.class, long.class, float.class, double.class, char.class);
         for (final Class<?> cls : primitiveClasses) {
             primitives.put(cls.getName(), cls);
         }
     }
 
-    public static Class<?> forName(final ObjectSpecification noSpec) {
-        final String fullName = noSpec.getFullIdentifier();
+    public static Class<?> forName(final ObjectSpecification objectSpec) {
+        final String fullName = objectSpec.getFullIdentifier();
         return forName(fullName);
     }
 

Copied: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActionParameters.java (from r1394445, incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActionParameters.java?p2=incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActionParameters.java&p1=incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java&r1=1394445&r2=1394681&rev=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ActionParams.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActionParameters.java Fri Oct  5 17:38:52 2012
@@ -22,9 +22,9 @@ package org.apache.isis.viewer.wicket.mo
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 
-public final class ActionParams {
+public final class ObjectActionParameters {
 
-    private ActionParams() {
+    private ObjectActionParameters() {
     }
 
     public static boolean compatibleWith(final ObjectAdapter contextAdapter, final ObjectActionParameter actionParam) {

Copied: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActions.java (from r1394445, incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActions.java?p2=incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActions.java&p1=incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java&r1=1394445&r2=1394681&rev=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/Actions.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectActions.java Fri Oct  5 17:38:52 2012
@@ -25,11 +25,10 @@ import org.apache.isis.core.metamodel.ad
 import org.apache.isis.core.metamodel.facets.named.NamedFacet;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
-import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
 
-public final class Actions {
+public final class ObjectActions {
 
-    private Actions() {
+    private ObjectActions() {
     }
 
     public static Predicate<ObjectAction> ofType(final ActionType type) {
@@ -42,7 +41,7 @@ public final class Actions {
     }
 
     public static String labelFor(final ObjectAction objectAction) {
-        final String actionName = Actions.nameFor(objectAction);
+        final String actionName = ObjectActions.nameFor(objectAction);
         String actionLabel = actionName;
         if (objectAction.getParameterCount() > 0) {
             actionLabel += "...";

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/util/ObjectAssociations.java Fri Oct  5 17:38:52 2012
@@ -75,5 +75,22 @@ public final class ObjectAssociations {
         return list;
     }
 
+    public static Function<ObjectAssociation, String> toName() {
+        return new Function<ObjectAssociation, String>() {
+            @Override
+            public String apply(final ObjectAssociation oa) {
+                return oa.getName();
+            }
+        };
+    }
+
+    public static Function<ObjectAssociation, String> toId() {
+        return new Function<ObjectAssociation, String>() {
+            @Override
+            public String apply(final ObjectAssociation oa) {
+                return oa.getId();
+            }
+        };
+    }
 
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/appactions/cssmenu/AppActionsCssMenuLinkFactory.java Fri Oct  5 17:38:52 2012
@@ -29,7 +29,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.PageType;
-import org.apache.isis.viewer.wicket.model.util.Actions;
+import org.apache.isis.viewer.wicket.model.util.ObjectActions;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
@@ -46,7 +46,7 @@ class AppActionsCssMenuLinkFactory imple
         final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ACTION);
 
         final AbstractLink link = Links.newBookmarkablePageLink(linkId, pageParameters, pageClass);
-        final String actionLabel = Actions.labelFor(action);
+        final String actionLabel = ObjectActions.labelFor(action);
 
         return new LinkAndLabel(link, actionLabel);
     }

Added: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkCollectionsLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkCollectionsLinkFactory.java?rev=1394681&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkCollectionsLinkFactory.java (added)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/BulkCollectionsLinkFactory.java Fri Oct  5 17:38:52 2012
@@ -0,0 +1,47 @@
+package org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
+import org.apache.wicket.markup.html.link.AbstractLink;
+
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.viewer.wicket.model.mementos.ActionMemento;
+import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
+import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
+import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory;
+
+final class BulkCollectionsLinkFactory implements CssMenuLinkFactory {
+    private static final long serialVersionUID = 1L;
+    private final EntityCollectionModel model;
+    private final DataTable<ObjectAdapter,String> dataTable;
+
+    BulkCollectionsLinkFactory(EntityCollectionModel model, DataTable<ObjectAdapter,String> dataTable) {
+        this.model = model;
+        this.dataTable = dataTable;
+    }
+
+    @Override
+    public LinkAndLabel newLink(final ObjectAdapterMemento contributorAdapterMemento, final ObjectAction objectAction, final String linkId) {
+        final ActionMemento actionMemento = new ActionMemento(objectAction);
+        AbstractLink link = new AjaxLink<Void>(linkId) {
+
+            private static final long serialVersionUID = 1L;
+
+            @Override
+            public void onClick(AjaxRequestTarget target) {
+                final ObjectAction objectAction = actionMemento.getAction();
+                for(ObjectAdapterMemento contributeeAdapterMemento: model.getToggleMementosList()) {
+                    final ObjectAdapter contributorAdapter = contributorAdapterMemento.getObjectAdapter(ConcurrencyChecking.NO_CHECK);
+                    final ObjectAdapter contributeeAdapter = contributeeAdapterMemento.getObjectAdapter(ConcurrencyChecking.CHECK);
+                    objectAction.execute(contributorAdapter, new ObjectAdapter[]{contributeeAdapter});
+                }
+                model.clearToggleMementosList();
+                target.add(dataTable);
+            }
+        };
+        return new LinkAndLabel(link, objectAction.getName());
+    }
+}
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsAsAjaxTable.java Fri Oct  5 17:38:52 2012
@@ -24,29 +24,16 @@ import java.util.List;
 import com.google.common.collect.Lists;
 
 import org.apache.wicket.Component;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackDefaultDataTable;
-import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackHeadersToolbar;
-import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxNavigationToolbar;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.NoRecordsToolbar;
-import org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilterToolbar;
 import org.apache.wicket.extensions.markup.html.repeater.util.SortableDataProvider;
-import org.apache.wicket.markup.html.link.AbstractLink;
-import org.apache.wicket.markup.repeater.Item;
-import org.apache.wicket.markup.repeater.OddEvenItem;
-import org.apache.wicket.markup.repeater.data.IDataProvider;
-import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.applib.filter.Filters;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
@@ -55,8 +42,6 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
 import org.apache.isis.viewer.wicket.model.common.SelectionHandler;
-import org.apache.isis.viewer.wicket.model.mementos.ActionMemento;
-import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.columns.ColumnAbstract;
 import org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable.columns.ObjectAdapterPropertyColumn;
@@ -105,28 +90,6 @@ public class CollectionContentsAsAjaxTab
         add(dataTable);
     }
     
-    public static class MyAjaxFallbackDefaultDataTable<T, S> extends DataTable<T, S>
-    {
-        private static final long serialVersionUID = 1L;
-
-        public MyAjaxFallbackDefaultDataTable(final String id, final List<? extends IColumn<T, S>> columns,
-            final ISortableDataProvider<T, S> dataProvider, final int rowsPerPage)
-        {
-            super(id, columns, dataProvider, rowsPerPage);
-            setOutputMarkupId(true);
-            setVersioned(false);
-            addTopToolbar(new AjaxFallbackHeadersToolbar<S>(this, dataProvider));
-            addBottomToolbar(new AjaxNavigationToolbar(this));
-            addBottomToolbar(new NoRecordsToolbar(this));
-        }
-
-        @Override
-        protected Item<T> newRowItem(final String id, final int index, final IModel<T> model)
-        {
-            return new OddEvenItem<T>(id, index, model);
-        }
-
-    }
     private void addToggleboxColumnIfRequired(final List<IColumn<ObjectAdapter,String>> columns) {
         final EntityCollectionModel model = getModel();
         
@@ -145,6 +108,12 @@ public class CollectionContentsAsAjaxTab
 
     private void buildEntityActionsGui() {
         final EntityCollectionModel model = getModel();
+        
+        if(model.isParented()) {
+            permanentlyHide(ID_ENTITY_ACTIONS);
+            return;
+        }
+        
         final ObjectSpecification typeSpec = model.getTypeOfSpecification();
         
         @SuppressWarnings("unchecked")
@@ -153,32 +122,9 @@ public class CollectionContentsAsAjaxTab
                         ObjectActionFilters.withNoBusinessRules(), ObjectActionFilters.contributedAnd1ParamAndVoid()
                 ));
 
-        final CssMenuLinkFactory linkFactory = new CssMenuLinkFactory(){
-
-            private static final long serialVersionUID = 1L;
-
-            @Override
-            public LinkAndLabel newLink(final ObjectAdapterMemento adapter, final ObjectAction objectAction, final String linkId) {
-                final ActionMemento actionMemento = new ActionMemento(objectAction);
-                AbstractLink link = new AjaxLink<Void>(linkId) {
-
-                    private static final long serialVersionUID = 1L;
-
-                    @Override
-                    public void onClick(AjaxRequestTarget target) {
-                        final ObjectAction objectAction = actionMemento.getAction();
-                        for(ObjectAdapterMemento adapterMemento: model.getToggleMementosList()) {
-                            objectAction.execute(adapter.getObjectAdapter(ConcurrencyChecking.NO_CHECK), new ObjectAdapter[]{adapterMemento.getObjectAdapter(ConcurrencyChecking.CHECK)});
-                        }
-                        model.clearToggleMementosList();
-                        target.add(dataTable);
-                    }
-                };
-                return new LinkAndLabel(link, objectAction.getName());
-            }
-        };
-
         if(!userActions.isEmpty()) {
+            final CssMenuLinkFactory linkFactory = new BulkCollectionsLinkFactory(model, dataTable);
+
             final CssMenuBuilder cssMenuBuilder = new CssMenuBuilder(null, getServiceAdapters(), userActions, linkFactory);
             // TODO: i18n
             final CssMenuPanel cssMenuPanel = cssMenuBuilder.buildPanel(ID_ENTITY_ACTIONS, "Actions");

Added: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/MyAjaxFallbackDefaultDataTable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/MyAjaxFallbackDefaultDataTable.java?rev=1394681&view=auto
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/MyAjaxFallbackDefaultDataTable.java (added)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/MyAjaxFallbackDefaultDataTable.java Fri Oct  5 17:38:52 2012
@@ -0,0 +1,36 @@
+package org.apache.isis.viewer.wicket.ui.components.collectioncontents.ajaxtable;
+
+import java.util.List;
+
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxFallbackHeadersToolbar;
+import org.apache.wicket.extensions.ajax.markup.html.repeater.data.table.AjaxNavigationToolbar;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
+import org.apache.wicket.extensions.markup.html.repeater.data.table.NoRecordsToolbar;
+import org.apache.wicket.markup.repeater.Item;
+import org.apache.wicket.markup.repeater.OddEvenItem;
+import org.apache.wicket.model.IModel;
+
+public class MyAjaxFallbackDefaultDataTable<T, S> extends DataTable<T, S>
+{
+    private static final long serialVersionUID = 1L;
+
+    public MyAjaxFallbackDefaultDataTable(final String id, final List<? extends IColumn<T, S>> columns,
+        final ISortableDataProvider<T, S> dataProvider, final int rowsPerPage)
+    {
+        super(id, columns, dataProvider, rowsPerPage);
+        setOutputMarkupId(true);
+        setVersioned(false);
+        addTopToolbar(new AjaxFallbackHeadersToolbar<S>(this, dataProvider));
+        addBottomToolbar(new AjaxNavigationToolbar(this));
+        addBottomToolbar(new NoRecordsToolbar(this));
+    }
+
+    @Override
+    protected Item<T> newRowItem(final String id, final int index, final IModel<T> model)
+    {
+        return new OddEvenItem<T>(id, index, model);
+    }
+
+}
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/action/EntityActionLinkFactory.java Fri Oct  5 17:38:52 2012
@@ -33,26 +33,26 @@ import org.apache.isis.runtimes.dflt.run
 import org.apache.isis.viewer.wicket.model.mementos.ActionMemento;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
-import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.model.models.ActionModel.SingleResultsMode;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
-import org.apache.isis.viewer.wicket.model.util.Actions;
+import org.apache.isis.viewer.wicket.model.models.PageType;
+import org.apache.isis.viewer.wicket.model.util.ObjectActions;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistryAccessor;
-import org.apache.isis.viewer.wicket.ui.components.entity.blocks.summary.EntitySummaryPanel;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
+import org.apache.isis.viewer.wicket.ui.pages.action.ActionPage;
 import org.apache.isis.viewer.wicket.ui.util.Links;
 
 public final class EntityActionLinkFactory implements CssMenuLinkFactory {
 
     private static final long serialVersionUID = 1L;
 
-    private final EntitySummaryPanel summaryPanel;
+    private final EntityModel entityModel;
 
-    public EntityActionLinkFactory(final EntityModel entityModel, final EntitySummaryPanel summaryPanel) {
-        this.summaryPanel = summaryPanel;
+    public EntityActionLinkFactory(final EntityModel entityModel) {
+        this.entityModel = entityModel;
     }
 
     @Override
@@ -60,8 +60,8 @@ public final class EntityActionLinkFacto
         final ObjectAdapter adapter = adapterMemento.getObjectAdapter(ConcurrencyChecking.NO_CHECK);
 
         final AbstractLink link = createLink(adapterMemento, action, linkId, adapter);
-        final ObjectAdapter contextAdapter = summaryPanel.getEntityModel().getObject();
-        final String label = Actions.labelFor(action, contextAdapter);
+        final ObjectAdapter contextAdapter = entityModel.getObject();
+        final String label = ObjectActions.labelFor(action, contextAdapter);
 
         return new LinkAndLabel(link, label);
     }
@@ -77,7 +77,7 @@ public final class EntityActionLinkFacto
 
     private AbstractLink createLinkForPersistent(final String linkId, final ObjectAdapterMemento adapterMemento, final ObjectAction action) {
         final ObjectAdapter adapter = adapterMemento.getObjectAdapter(ConcurrencyChecking.NO_CHECK);
-        final ObjectAdapter contextAdapter = summaryPanel.getEntityModel().getObject();
+        final ObjectAdapter contextAdapter = entityModel.getObject();
 
         final PageParameters pageParameters = ActionModel.createPageParameters(adapter, action, contextAdapter, ActionModel.SingleResultsMode.REDIRECT);
         final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ACTION);
@@ -96,7 +96,7 @@ public final class EntityActionLinkFacto
                 // let multiple setResponsePage() calls once
                 // committed to redirecting (I'm guessing)
                 final ActionModel actionModel = ActionModel.create(adapterMemento, actionMemento, actionMode, SingleResultsMode.INLINE);
-                summaryPanel.onClick(actionModel);
+                setResponsePage(new ActionPage(actionModel));
             }
         };
     }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.css
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.css?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.css (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.css Fri Oct  5 17:38:52 2012
@@ -22,4 +22,9 @@
  
 .entityCollections fieldset legend {
 	margin-left: 10px;
-}
\ No newline at end of file
+}
+
+.entityCollections .actions {
+	float: right;
+	height: 0px;
+}

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.html
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.html?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.html (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.html Fri Oct  5 17:38:52 2012
@@ -24,6 +24,17 @@
 		    	<div wicket:id="collections">
 		    		<fieldset wicket:id="collectionGroup" class="memberGroup">
 		    			<legend wicket:id="collectionName">[collection name]</legend>
+		    			<div class="actions panel">				
+			  				<table>
+			      	   			<tbody>
+			      	      			<tr>
+			      						<td>
+			      			      			<span class="groupedActions" wicket:id="groupedActions"/>
+			      		      			</td>
+			      	     			</tr>
+			           			</tbody>
+			   			   </table>
+					    </div>
                 		<div wicket:id="collection" class="collection">[collection]</div>
                 	</fieldset>
 		    	</div>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsPanel.java Fri Oct  5 17:38:52 2012
@@ -21,25 +21,44 @@ package org.apache.isis.viewer.wicket.ui
 
 import java.util.List;
 
+import com.google.common.base.Strings;
+
 import org.apache.wicket.Component;
 import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.link.AbstractLink;
 import org.apache.wicket.markup.repeater.RepeatingView;
 
+import org.apache.isis.applib.annotation.MemberOrder;
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.applib.filter.Filters;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
+import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
+import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
+import org.apache.isis.core.metamodel.spec.feature.ObjectActionFilters;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
 import org.apache.isis.core.metamodel.spec.feature.OneToManyAssociation;
+import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer.Contributed;
+import org.apache.isis.viewer.wicket.model.mementos.ActionMemento;
+import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.EntityCollectionModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.components.collection.CollectionPanel;
+import org.apache.isis.viewer.wicket.ui.components.entity.blocks.action.EntityActionLinkFactory;
+import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuBuilder;
+import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory;
+import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuPanel;
+import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory.LinkAndLabel;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
+import org.apache.isis.viewer.wicket.ui.util.Components;
 import org.apache.isis.viewer.wicket.ui.util.EvenOrOddCssClassAppenderFactory;
 
 /**
@@ -56,6 +75,8 @@ public class EntityCollectionsPanel exte
     private static final String ID_COLLECTIONS = "collections";
     private static final String ID_COLLECTION = "collection";
 
+    private static final String ID_GROUPED_ACTIONS = "groupedActions";
+
     public EntityCollectionsPanel(final String id, final EntityModel entityModel) {
         super(id, entityModel);
         buildGui();
@@ -92,12 +113,12 @@ public class EntityCollectionsPanel exte
             final WebMarkupContainer collectionRvContainer = new WebMarkupContainer(collectionRv.newChildId());
             collectionRv.add(collectionRvContainer);
             collectionRvContainer.add(eo.nextClass());
-
+            
             addCollectionToForm(entityModel, association, collectionRvContainer);
         }
     }
 
-	private void addCollectionToForm(final EntityModel entityModel,
+    private void addCollectionToForm(final EntityModel entityModel,
 			final ObjectAssociation association,
 			final WebMarkupContainer collectionRvContainer) {
 	    
@@ -107,6 +128,8 @@ public class EntityCollectionsPanel exte
         final String name = association.getName();
         fieldset.add(new Label(ID_COLLECTION_NAME, name));
 
+        buildEntityActionsGui(fieldset, association);
+
 		final OneToManyAssociation otma = (OneToManyAssociation) association;
 
 		final EntityCollectionModel entityCollectionModel = EntityCollectionModel.createParented(entityModel, otma);
@@ -116,6 +139,55 @@ public class EntityCollectionsPanel exte
 		getComponentFactoryRegistry().addOrReplaceComponent(fieldset, ID_COLLECTION, ComponentType.COLLECTION_NAME_AND_CONTENTS, entityCollectionModel);
 	}
 
+    private void buildEntityActionsGui(WebMarkupContainer collectionRvContainer, ObjectAssociation association) {
+        
+        final EntityModel model = getModel();
+        final ObjectSpecification adapterSpec = model.getTypeOfSpecification();
+        final ObjectAdapter adapter = model.getObject();
+        final ObjectAdapterMemento adapterMemento = model.getObjectAdapterMemento();
+        
+        @SuppressWarnings("unchecked")
+        final List<ObjectAction> userActions = adapterSpec.getObjectActions(ActionType.USER, Contributed.INCLUDED,
+                Filters.and(memberOrderOf(association), dynamicallyVisibleFor(adapter)));
+
+        final CssMenuLinkFactory linkFactory = new EntityActionLinkFactory(getEntityModel());
+
+        if(!userActions.isEmpty()) {
+            final CssMenuBuilder cssMenuBuilder = new CssMenuBuilder(adapterMemento, getServiceAdapters(), userActions, linkFactory);
+            // TODO: i18n
+            final CssMenuPanel cssMenuPanel = cssMenuBuilder.buildPanel(ID_GROUPED_ACTIONS, "Actions");
+
+            collectionRvContainer.addOrReplace(cssMenuPanel);
+        } else {
+            Components.permanentlyHide(collectionRvContainer, ID_GROUPED_ACTIONS);
+        }
+    }
+
+    private Filter<ObjectAction> dynamicallyVisibleFor(final ObjectAdapter adapter) {
+        return ObjectActionFilters.dynamicallyVisible(getAuthenticationSession(), adapter, Where.ANYWHERE);
+    }
+
+    private Filter<ObjectAction> memberOrderOf(ObjectAssociation association) {
+        final String collectionName = association.getName();
+        final String collectionId = association.getId();
+        return new Filter<ObjectAction>() {
+
+            @Override
+            public boolean accept(ObjectAction t) {
+                final MemberOrderFacet memberOrderFacet = t.getFacet(MemberOrderFacet.class);
+                if(memberOrderFacet == null) {
+                    return false; 
+                }
+                final String memberOrderName = memberOrderFacet.name();
+                if(Strings.isNullOrEmpty(memberOrderName)) {
+                    return false;
+                }
+                return memberOrderName.equals(collectionName) || memberOrderName.equals(collectionId);
+            }
+        };
+    }
+
+
     private List<ObjectAssociation> visibleAssociations(final ObjectAdapter adapter, final ObjectSpecification noSpec) {
         return noSpec.getAssociations(visibleAssociationFilter(adapter));
     }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/summary/EntitySummaryPanel.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/summary/EntitySummaryPanel.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/summary/EntitySummaryPanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/summary/EntitySummaryPanel.java Fri Oct  5 17:38:52 2012
@@ -21,21 +21,28 @@ package org.apache.isis.viewer.wicket.ui
 
 import java.util.List;
 
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
 import com.google.inject.Inject;
 
 import org.apache.wicket.Component;
 
 import org.apache.isis.applib.annotation.Where;
+import org.apache.isis.applib.filter.Filter;
+import org.apache.isis.applib.filter.Filters;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.facets.members.order.MemberOrderFacet;
 import org.apache.isis.core.metamodel.spec.ActionType;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionContainer.Contributed;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionFilters;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.model.models.ImageResourceCache;
+import org.apache.isis.viewer.wicket.model.util.ObjectAssociations;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
 import org.apache.isis.viewer.wicket.ui.components.actions.ActionInvokeHandler;
@@ -62,7 +69,7 @@ public class EntitySummaryPanel extends 
 
     public EntitySummaryPanel(final String id, final EntityModel entityModel) {
         super(id, entityModel);
-        linkFactory = new EntityActionLinkFactory(getEntityModel(), this);
+        linkFactory = new EntityActionLinkFactory(getEntityModel());
     }
 
     /**
@@ -97,7 +104,9 @@ public class EntitySummaryPanel extends 
         if (adapter != null) {
             final ObjectSpecification adapterSpec = adapter.getSpecification();
             
-            final List<ObjectAction> userActions = adapterSpec.getObjectActions(ActionType.USER, Contributed.INCLUDED, ObjectActionFilters.dynamicallyVisible(getAuthenticationSession(), adapter, Where.ANYWHERE));
+            @SuppressWarnings("unchecked")
+            final List<ObjectAction> userActions = adapterSpec.getObjectActions(ActionType.USER, Contributed.INCLUDED, 
+                    Filters.and(memberOrderNameNotCollection(adapterSpec), dynamicallyVisibleFor(adapter)));
 
             if(!userActions.isEmpty()) {
                 final CssMenuBuilder cssMenuBuilder = new CssMenuBuilder(adapterMemento, getServiceAdapters(), userActions, linkFactory);
@@ -112,6 +121,31 @@ public class EntitySummaryPanel extends 
             permanentlyHide(ID_ENTITY_ACTIONS);
         }
     }
+    
+    private Filter<ObjectAction> memberOrderNameNotCollection(final ObjectSpecification adapterSpec) {
+
+        final List<ObjectAssociation> associations = adapterSpec.getAssociations();
+        final List<String> associationNames = Lists.transform(associations, ObjectAssociations.toName());
+        final List<String> associationIds = Lists.transform(associations, ObjectAssociations.toId());
+
+        return new Filter<ObjectAction>() {
+
+            @Override
+            public boolean accept(ObjectAction t) {
+                final MemberOrderFacet memberOrderFacet = t.getFacet(MemberOrderFacet.class);
+                if(memberOrderFacet == null || Strings.isNullOrEmpty(memberOrderFacet.name())) {
+                    return true;
+                }
+                String memberOrderName = memberOrderFacet.name();
+                return !associationNames.contains(memberOrderName) && !associationIds.contains(memberOrderName);
+            }
+        };
+    }
+
+
+    protected Filter<ObjectAction> dynamicallyVisibleFor(final ObjectAdapter adapter) {
+        return ObjectActionFilters.dynamicallyVisible(getAuthenticationSession(), adapter, Where.ANYWHERE);
+    }
 
     @Override
     public void onClick(final ActionModel actionModel) {

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuBuilder.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuBuilder.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuBuilder.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuBuilder.java Fri Oct  5 17:38:52 2012
@@ -34,7 +34,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 import org.apache.isis.core.progmodel.facets.actions.notcontributed.NotContributedFacet;
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
-import org.apache.isis.viewer.wicket.model.util.Actions;
+import org.apache.isis.viewer.wicket.model.util.ObjectActions;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuItem.Builder;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuPanel.Style;
 
@@ -95,7 +95,7 @@ public class CssMenuBuilder {
     }
 
     private void addMenuItemsForActionsOfType(final CssMenuItem parent, final List<ObjectAction> actions, final ActionType type) {
-        final Collection<ObjectAction> filterActionsOfType = Collections2.filter(actions, Actions.ofType(type));
+        final Collection<ObjectAction> filterActionsOfType = Collections2.filter(actions, ObjectActions.ofType(type));
         for (final ObjectAction action : filterActionsOfType) {
             addMenuItem(parent, action);
         }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/entitylink/FindUsingLinkFactory.java Fri Oct  5 17:38:52 2012
@@ -30,7 +30,7 @@ import org.apache.isis.viewer.wicket.mod
 import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
 import org.apache.isis.viewer.wicket.model.models.ActionModel;
 import org.apache.isis.viewer.wicket.model.models.ActionModel.SingleResultsMode;
-import org.apache.isis.viewer.wicket.model.util.Actions;
+import org.apache.isis.viewer.wicket.model.util.ObjectActions;
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuLinkFactory;
 
 public final class FindUsingLinkFactory implements CssMenuLinkFactory {
@@ -79,7 +79,7 @@ public final class FindUsingLinkFactory 
             public void onClick() {
                 callback.onClick(actionModel);
             }
-        }, Actions.labelFor(action));
+        }, ObjectActions.labelFor(action));
     }
 
 }
\ No newline at end of file

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css?rev=1394681&r1=1394680&r2=1394681&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css Fri Oct  5 17:38:52 2012
@@ -318,15 +318,18 @@ div.scalarPanel {
 
 /********************* Select2 component styling *****************************/
 
+.actionPage .select2-container,
 .entityPage .select2-container {
 	width: 200px;
 }
 
+.actionPage .select2-container .select2-choice,
 .entityPage .select2-container .select2-choice {
     padding: 0 0 0 0px;
 }
 
 
+.actionPage .select2-container .select2-choice,
 .entityPage .select2-container .select2-choice {
     -webkit-border-radius: 0px;
     -moz-border-radius: 0px;
@@ -337,25 +340,28 @@ div.scalarPanel {
 	
 }
 
-.entityPage .select2-container.select2-drop-above .select2-choice
-{
+.actionPage .select2-container.select2-drop-above .select2-choice,
+.entityPage .select2-container.select2-drop-above .select2-choice {
     -webkit-border-radius:0px;
     -moz-border-radius:0px;
     border-radius:0px;
 }
 
+.actionPage .select2-drop,
 .entityPage .select2-drop {
     -webkit-border-radius:0px;
     -moz-border-radius:0px;
     border-radius:0px;
 }
 
+.actionPage .select2-drop.select2-drop-above,
 .entityPage .select2-drop.select2-drop-above {
     -webkit-border-radius:0px;
     -moz-border-radius:0px;
     border-radius:0px;
 }
 
+.actionPage .select2-container .select2-choice div,
 .entityPage .select2-container .select2-choice div {
     -webkit-border-radius:0px;
     -moz-border-radius:0px;
@@ -363,11 +369,13 @@ div.scalarPanel {
     background: #EBEBE4;
 }
 
+.actionPage .select2-container.select2-container-disabled .select2-choice,
 .entityPage .select2-container.select2-container-disabled .select2-choice {
 	background-color: #EBEBE4;
 	border: 1px solid #AAA;
 }
 
+.actionPage .select2-container a,
 .entityPage .select2-container a {
 	font-weight: normal;
 }



Mime
View raw message