incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1380413 [1/4] - in /incubator/isis/trunk/framework: applib/src/main/java/org/apache/isis/applib/annotation/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/hide/ core/metamodel/src/main/java/org/apache/isis/core/metamode...
Date Tue, 04 Sep 2012 00:50:08 GMT
Author: danhaywood
Date: Tue Sep  4 00:50:04 2012
New Revision: 1380413

URL: http://svn.apache.org/viewvc?rev=1380413&view=rev
Log:
ISIS-258, ISIS-14: specify Where in viewers, JDO

* specify 'Where' value for visibility/usability checks (throughout Isis codebase)
* fix Wicket viewer's incorrect use of Where
* upgrade DataNucleus to 3.1.1

Modified:
    incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Disabled.java
    incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Hidden.java
    incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Where.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/hide/HiddenFacet.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionUsabilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionVisibilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionUsabilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionVisibilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionImpl.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/feature/ObjectAssociationFiltersTest_visibleWhere.java
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFiltersTests.java
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest.java
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest_alwaysHidden.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/DisabledFacetNever.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/staticmethod/DisabledFacetAlwaysEverywhere.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetAbstract.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetImpl.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetNever.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlwaysEverywhere.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutable.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/disable/DisabledAnnotationFacetFactoryTest.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/hide/HiddenAnnotationFacetFactoryTest.java
    incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/main/java/org/apache/isis/progmodel/wrapper/metamodel/internal/DomainObjectInvocationHandler.java
    incubator/isis/trunk/framework/progmodels/wrapper/wrapper-metamodel/src/test/java/org/apache/isis/progmodel/wrapper/WrappedFactoryDefaultTest_wrappedObject_transient.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-metamodel/src/main/java/org/apache/isis/runtimes/dflt/objectstores/jdo/metamodel/facets/prop/primarykey/DisabledFacetDerivedFromJdoPrimaryKeyAnnotation.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/system/ObjectMemberAbstractTest.java
    incubator/isis/trunk/framework/viewer/bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/fixtures/perform/PerformContext.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/FormWithTableSpecification.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/SplitViewSpecification.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/combined/TwoPartViewSpecification.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/form/ExpandableViewBorder.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/table/TableCellBuilder.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/ClosedObjectNodeSpecification.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/tree/OpenObjectNodeSpecification.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/AbstractObjectOption.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/DialoggedObjectOption.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/action/ImmediateObjectOption.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/composite/ObjectFieldBuilder.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/content/AbstractObjectContent.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToManyFieldElementImpl.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToManyFieldImpl.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/OneToOneFieldImpl.java
    incubator/isis/trunk/framework/viewer/dnd/src/main/java/org/apache/isis/viewer/dnd/view/field/TextParseableFieldImpl.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/FieldCollectionView.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/ObjectView.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/MenuUtil.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/action/view/util/TableUtil.java
    incubator/isis/trunk/framework/viewer/html/src/main/java/org/apache/isis/viewer/html/task/EditTask.java
    incubator/isis/trunk/framework/viewer/html/src/test/java/org/apache/isis/viewer/html/context/ObjectActionNoop.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContext.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/ResourceAbstract.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/AbstractObjectMemberReprRenderer.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectReprRenderer.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainObjectResourceServerside.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainResourceHelper.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/DomainServiceResourceServerside.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/ObjectActionReprRenderer.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/ObjectCollectionReprRenderer.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domainobjects/ObjectPropertyReprRenderer.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/domaintypes/DomainTypeResourceServerside.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/home/HomePageResourceServerside.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/user/UserResourceServerside.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/main/java/org/apache/isis/viewer/restfulobjects/viewer/resources/version/VersionResourceServerside.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_ensureCompatibleAcceptHeader.java
    incubator/isis/trunk/framework/viewer/restfulobjects/restfulobjects-viewer/src/test/java/org/apache/isis/viewer/restfulobjects/viewer/ResourceContextTest_getArg.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/action/ActionAction.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/EditAction.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/edit/RemoveAction.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/util/MethodsUtils.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionButton.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionForm.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/ActionLink.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/Methods.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/action/RunAction.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/debug/Members.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractFormView.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/AbstractTableView.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/FieldLabel.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/FieldValue.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/GetField.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/IncludeObject.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/TableCell.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/display/Title.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/edit/EditObject.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractConditionalBlock.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/AbstractLink.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/EditLink.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/NewActionLink.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/ObjectLink.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/simple/RemoveElement.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/FieldName.java
    incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/view/value/TitleString.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ScalarModel.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/propcoll/EntityCollectionsReadOnlyFormPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityPropertiesAndOrCollectionsPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/cssmenu/CssMenuItem.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/ProcessObjectPanelAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/test/java/org/apache/isis/viewer/wicket/ui/fixtures/ActionFixtures.java

Modified: incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Disabled.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Disabled.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Disabled.java (original)
+++ incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Disabled.java Tue Sep  4 00:50:04 2012
@@ -33,5 +33,5 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Disabled {
     When when() default When.ALWAYS;
-    Where where() default Where.EVERYWHERE;
+    Where where() default Where.ANYWHERE;
 }

Modified: incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Hidden.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Hidden.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Hidden.java (original)
+++ incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Hidden.java Tue Sep  4 00:50:04 2012
@@ -38,5 +38,5 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 public @interface Hidden {
     When when() default When.ALWAYS;
-    Where where() default Where.EVERYWHERE;
+    Where where() default Where.ANYWHERE;
 }

Modified: incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Where.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Where.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Where.java (original)
+++ incubator/isis/trunk/framework/applib/src/main/java/org/apache/isis/applib/annotation/Where.java Tue Sep  4 00:50:04 2012
@@ -21,11 +21,28 @@ package org.apache.isis.applib.annotatio
 
 import org.apache.isis.applib.util.Enums;
 
+/**
+ * Represents the location in the user interface where a class member is to be rendered.
+ * 
+ * <p>
+ * Used to control visibility (eg using the {@link Hidden} annotation) and enablement
+ * (eg using the {@link Disabled} annotation) in different regions of the user interface.
+ * 
+ * <p>
+ * The application programmer may use any of the values of this enum.  Some represent
+ * concrete locations (eg {@link #OBJECT_FORM}, {@link #PARENTED_TABLE}), whereas some 
+ * represent a combination of locations (eg {@link #ALL_TABLES}, {@link #ANYWHERE}).
+ * 
+ * <h4>Framework Implementation Notes</h4>
+ * <p>
+ * This enum is also used internally within the framework.  When rendering an element,
+ * the framework developer should only use those values that represent concrete locations.  
+ */
 public enum Where {
     /**
      * The member should be disabled/hidden everywhere.
      */
-    EVERYWHERE {
+    ANYWHERE {
         @Override
         public boolean includes(Where context) {
             return true;
@@ -93,6 +110,12 @@ public enum Where {
         return this == STANDALONE_TABLE || this == ALL_TABLES;
     }
 
+    /**
+     * Whether this <tt>Where</tt> is a superset of the context <tt>Where</tt> provided.
+     * 
+     * <p>
+     * For example, {@link #ALL_TABLES} includes {@link #STANDALONE_TABLE}; {@link #ANYWHERE} includes all others.
+     */
     public boolean includes(Where context) {
         return context == this;
     }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/hide/HiddenFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/hide/HiddenFacet.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/hide/HiddenFacet.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/hide/HiddenFacet.java Tue Sep  4 00:50:04 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.metamodel.facets.hide;
 
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.WhenAndWhereValueFacet;
 import org.apache.isis.core.metamodel.interactions.HidingInteractionAdvisor;
@@ -36,6 +37,6 @@ public interface HiddenFacet extends Whe
      * The reason why the (feature of the) target object is currently hidden, or
      * <tt>null</tt> if visible.
      */
-    public String hiddenReason(ObjectAdapter target);
+    public String hiddenReason(ObjectAdapter target, Where whereContext);
 
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionUsabilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionUsabilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionUsabilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionUsabilityContext.java Tue Sep  4 00:50:04 2012
@@ -22,6 +22,7 @@ package org.apache.isis.core.metamodel.i
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.ActionUsabilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -34,8 +35,8 @@ import org.apache.isis.core.metamodel.co
  */
 public class ActionUsabilityContext extends UsabilityContext<ActionUsabilityEvent> {
 
-    public ActionUsabilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier id) {
-        super(InteractionContextType.ACTION_USABLE, session, invocationMethod, id, target);
+    public ActionUsabilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier id, Where where) {
+        super(InteractionContextType.ACTION_USABLE, session, invocationMethod, id, target, where);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionVisibilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionVisibilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionVisibilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/ActionVisibilityContext.java Tue Sep  4 00:50:04 2012
@@ -22,6 +22,7 @@ package org.apache.isis.core.metamodel.i
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.ActionVisibilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -34,8 +35,8 @@ import org.apache.isis.core.metamodel.co
  */
 public class ActionVisibilityContext extends VisibilityContext<ActionVisibilityEvent> {
 
-    public ActionVisibilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
-        super(InteractionContextType.ACTION_VISIBLE, session, invocationMethod, identifier, target);
+    public ActionVisibilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier, Where where) {
+        super(InteractionContextType.ACTION_VISIBLE, session, invocationMethod, identifier, target, where);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionUsabilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionUsabilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionUsabilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionUsabilityContext.java Tue Sep  4 00:50:04 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.core.metamodel.interactions;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.CollectionUsabilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -32,8 +33,8 @@ import org.apache.isis.core.metamodel.co
  */
 public class CollectionUsabilityContext extends UsabilityContext<CollectionUsabilityEvent> {
 
-    public CollectionUsabilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
-        super(InteractionContextType.COLLECTION_USABLE, session, invocationMethod, identifier, target);
+    public CollectionUsabilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier, Where where) {
+        super(InteractionContextType.COLLECTION_USABLE, session, invocationMethod, identifier, target, where);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionVisibilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionVisibilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionVisibilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/CollectionVisibilityContext.java Tue Sep  4 00:50:04 2012
@@ -22,6 +22,7 @@ package org.apache.isis.core.metamodel.i
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.CollectionVisibilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -34,8 +35,8 @@ import org.apache.isis.core.metamodel.co
  */
 public class CollectionVisibilityContext extends VisibilityContext<CollectionVisibilityEvent> {
 
-    public CollectionVisibilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
-        super(InteractionContextType.COLLECTION_VISIBLE, session, invocationMethod, identifier, target);
+    public CollectionVisibilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier, Where where) {
+        super(InteractionContextType.COLLECTION_VISIBLE, session, invocationMethod, identifier, target, where);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/InteractionContext.java Tue Sep  4 00:50:04 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.core.metamodel.interactions;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.InteractionEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyUsabilityContext.java Tue Sep  4 00:50:04 2012
@@ -22,6 +22,7 @@ package org.apache.isis.core.metamodel.i
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.PropertyUsabilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -34,8 +35,8 @@ import org.apache.isis.core.metamodel.co
  */
 public class PropertyUsabilityContext extends UsabilityContext<PropertyUsabilityEvent> {
 
-    public PropertyUsabilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
-        super(InteractionContextType.PROPERTY_USABLE, session, invocationMethod, identifier, target);
+    public PropertyUsabilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier, Where where) {
+        super(InteractionContextType.PROPERTY_USABLE, session, invocationMethod, identifier, target, where);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/PropertyVisibilityContext.java Tue Sep  4 00:50:04 2012
@@ -22,6 +22,7 @@ package org.apache.isis.core.metamodel.i
 import static org.apache.isis.core.metamodel.adapter.util.AdapterUtils.unwrap;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.PropertyVisibilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -34,8 +35,8 @@ import org.apache.isis.core.metamodel.co
  */
 public class PropertyVisibilityContext extends VisibilityContext<PropertyVisibilityEvent> {
 
-    public PropertyVisibilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier) {
-        super(InteractionContextType.PROPERTY_VISIBLE, session, invocationMethod, identifier, target);
+    public PropertyVisibilityContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, final Identifier identifier, Where where) {
+        super(InteractionContextType.PROPERTY_VISIBLE, session, invocationMethod, identifier, target, where);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/UsabilityContext.java Tue Sep  4 00:50:04 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.core.metamodel.interactions;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.UsabilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -32,8 +33,19 @@ import org.apache.isis.core.metamodel.co
  */
 public abstract class UsabilityContext<T extends UsabilityEvent> extends InteractionContext<T> {
 
-    public UsabilityContext(final InteractionContextType interactionType, final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target) {
+    private final Where where;
+
+    public UsabilityContext(final InteractionContextType interactionType, final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target, final Where where) {
         super(interactionType, session, invocationMethod, identifier, target);
+        this.where = where;
+    }
+
+    /**
+     * Where the element is to be rendered.
+     */
+    public Where getWhere() {
+        return where;
     }
 
+
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/interactions/VisibilityContext.java Tue Sep  4 00:50:04 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.core.metamodel.interactions;
 
 import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.events.VisibilityEvent;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -32,8 +33,17 @@ import org.apache.isis.core.metamodel.co
  */
 public abstract class VisibilityContext<T extends VisibilityEvent> extends InteractionContext<T> {
 
-    public VisibilityContext(final InteractionContextType interactionType, final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target) {
+    private Where where;
+
+    public VisibilityContext(final InteractionContextType interactionType, final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final Identifier identifier, final ObjectAdapter target, Where where) {
         super(interactionType, session, invocationMethod, identifier, target);
+        this.where = where;
     }
 
+    /**
+     * Where the element is to be rendered.
+     */
+    public Where getWhere() {
+        return where;
+    }
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectActionSet.java Tue Sep  4 00:50:04 2012
@@ -26,6 +26,7 @@ import com.google.common.collect.Lists;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.exceptions.UnexpectedCallException;
@@ -274,12 +275,12 @@ public class ObjectActionSet implements 
      * Does nothing, but shouldn't be called.
      */
     @Override
-    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter) {
+    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter, Where where) {
         return null;
     }
 
     @Override
-    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target) {
+    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target, Where where) {
         return Allow.DEFAULT;
     }
 
@@ -288,12 +289,12 @@ public class ObjectActionSet implements 
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target) {
+    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, Where where) {
         return null;
     }
 
     @Override
-    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target) {
+    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target, Where where) {
         return Allow.DEFAULT;
     }
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFilters.java Tue Sep  4 00:50:04 2012
@@ -101,7 +101,7 @@ public class ObjectAssociationFilters {
         }
     };
 
-    public static final Filter<ObjectAssociation> visibleWhere(final Where context) {
+    public static final Filter<ObjectAssociation> staticallyVisible(final Where context) {
         return new Filter<ObjectAssociation>() {
             @Override
             public boolean accept(final ObjectAssociation association) {
@@ -109,24 +109,17 @@ public class ObjectAssociationFilters {
                 if(facet == null) {
                     return true;
                 }
-                if(facet.when() != When.ALWAYS) {
-                    return true;
-                }
-                return !facet.where().includes(context);
+                return !(facet.where().includes(context) && facet.when() == When.ALWAYS);
             }
         };
     }
 
     
-    /**
-     * Filters only properties that are visible statically, ie have not been
-     * hidden at compile time.
-     */
-    public static Filter<ObjectAssociation> dynamicallyVisible(final AuthenticationSession session, final ObjectAdapter target) {
+    public static Filter<ObjectAssociation> dynamicallyVisible(final AuthenticationSession session, final ObjectAdapter target, final Where where) {
         return new Filter<ObjectAssociation>() {
             @Override
             public boolean accept(final ObjectAssociation objectAssociation) {
-                final Consent visible = objectAssociation.isVisible(session, target);
+                final Consent visible = objectAssociation.isVisible(session, target, where);
                 return visible.isAllowed();
             }
         };

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectMember.java Tue Sep  4 00:50:04 2012
@@ -20,6 +20,7 @@
 package org.apache.isis.core.metamodel.spec.feature;
 
 import org.apache.isis.applib.annotation.When;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.consent.Consent;
@@ -68,22 +69,25 @@ public interface ObjectMember extends Ob
      * 
      * <p>
      * Typically it is easier to just call
-     * {@link #isVisible(AuthenticationSession, ObjectAdapter)} or
+     * {@link #isVisible(AuthenticationSession, ObjectAdapter, Where)} or
      * {@link #isVisibleResult(AuthenticationSession, ObjectAdapter)}; this is
      * provided as API for symmetry with interactions (such as
      * {@link AccessContext} accesses) have no corresponding vetoing methods.
+     * @param where TODO
      */
-    VisibilityContext<?> createVisibleInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, ObjectAdapter targetObjectAdapter);
+    VisibilityContext<?> createVisibleInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, ObjectAdapter targetObjectAdapter, Where where);
 
     /**
      * Determines if this member is visible, represented as a {@link Consent}.
      * 
      * @param target
      *            may be <tt>null</tt> if just checking for authorization.
+     * @param where 
+     *            the member is being rendered in the UI
      * 
      * @see #isVisibleResult(AuthenticationSession, ObjectAdapter)
      */
-    Consent isVisible(AuthenticationSession session, ObjectAdapter target);
+    Consent isVisible(AuthenticationSession session, ObjectAdapter target, Where where);
 
     // /////////////////////////////////////////////////////////////
     // Disabled (or enabled)
@@ -96,23 +100,25 @@ public interface ObjectMember extends Ob
      * 
      * <p>
      * Typically it is easier to just call
-     * {@link #isUsable(AuthenticationSession, ObjectAdapter)} or
+     * {@link #isUsable(AuthenticationSession, ObjectAdapter, Where)} or
      * {@link #isUsableResult(AuthenticationSession, ObjectAdapter)}; this is
      * provided as API for symmetry with interactions (such as
      * {@link AccessContext} accesses) have no corresponding vetoing methods.
+     * @param where TODO
      */
-    UsabilityContext<?> createUsableInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, ObjectAdapter target);
+    UsabilityContext<?> createUsableInteractionContext(AuthenticationSession session, InteractionInvocationMethod invocationMethod, ObjectAdapter target, Where where);
 
     /**
      * Determines whether this member is usable, represented as a
      * {@link Consent}.
-     * 
      * @param target
      *            may be <tt>null</tt> if just checking for authorization.
+     * @param where 
+     *            the member is being rendered in the UI
      * 
      * @see #isUsableResult(AuthenticationSession, ObjectAdapter)
      */
-    Consent isUsable(AuthenticationSession session, ObjectAdapter target);
+    Consent isUsable(AuthenticationSession session, ObjectAdapter target, Where where);
 
     // /////////////////////////////////////////////////////////////
     // isAssociation, isAction

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionImpl.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionImpl.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionImpl.java Tue Sep  4 00:50:04 2012
@@ -28,6 +28,7 @@ import com.google.common.collect.Lists;
 import org.apache.log4j.Logger;
 
 import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.applib.query.QueryFindAllInstances;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
@@ -317,13 +318,13 @@ public class ObjectActionImpl extends Ob
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter) {
-        return new ActionVisibilityContext(session, invocationMethod, targetObjectAdapter, getIdentifier());
+    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter, Where where) {
+        return new ActionVisibilityContext(session, invocationMethod, targetObjectAdapter, getIdentifier(), where);
     }
 
     @Override
-    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target) {
-        return super.isVisible(session, realTarget(target));
+    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        return super.isVisible(session, realTarget(target), where);
     }
 
     // /////////////////////////////////////////////////////////////
@@ -331,13 +332,13 @@ public class ObjectActionImpl extends Ob
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter) {
-        return new ActionUsabilityContext(session, invocationMethod, targetObjectAdapter, getIdentifier());
+    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter, Where where) {
+        return new ActionUsabilityContext(session, invocationMethod, targetObjectAdapter, getIdentifier(), where);
     }
 
     @Override
-    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target) {
-        return super.isUsable(session, realTarget(target));
+    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        return super.isUsable(session, realTarget(target), where);
     }
 
     // //////////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectMemberAbstract.java Tue Sep  4 00:50:04 2012
@@ -209,12 +209,12 @@ public abstract class ObjectMemberAbstra
      * initiated {@link InteractionInvocationMethod#BY_USER by user}.
      */
     @Override
-    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target) {
-        return isVisibleResult(session, target).createConsent();
+    public Consent isVisible(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        return isVisibleResult(session, target, where).createConsent();
     }
 
-    private InteractionResult isVisibleResult(final AuthenticationSession session, final ObjectAdapter target) {
-        final VisibilityContext<?> ic = createVisibleInteractionContext(session, InteractionInvocationMethod.BY_USER, target);
+    private InteractionResult isVisibleResult(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        final VisibilityContext<?> ic = createVisibleInteractionContext(session, InteractionInvocationMethod.BY_USER, target, where);
         return InteractionUtils.isVisibleResult(this, ic);
     }
 
@@ -231,12 +231,12 @@ public abstract class ObjectMemberAbstra
      * initiated {@link InteractionInvocationMethod#BY_USER by user}.
      */
     @Override
-    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target) {
-        return isUsableResult(session, target).createConsent();
+    public Consent isUsable(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        return isUsableResult(session, target, where).createConsent();
     }
 
-    private InteractionResult isUsableResult(final AuthenticationSession session, final ObjectAdapter target) {
-        final UsabilityContext<?> ic = createUsableInteractionContext(session, InteractionInvocationMethod.BY_USER, target);
+    private InteractionResult isUsableResult(final AuthenticationSession session, final ObjectAdapter target, Where where) {
+        final UsabilityContext<?> ic = createUsableInteractionContext(session, InteractionInvocationMethod.BY_USER, target, where);
         return InteractionUtils.isUsableResult(this, ic);
     }
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToManyAssociationImpl.java Tue Sep  4 00:50:04 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.metamodel.specloader.specimpl;
 
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.debug.DebugString;
 import org.apache.isis.core.commons.exceptions.IsisException;
@@ -64,8 +65,8 @@ public class OneToManyAssociationImpl ex
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter) {
-        return new CollectionVisibilityContext(session, invocationMethod, ownerAdapter, getIdentifier());
+    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter, Where where) {
+        return new CollectionVisibilityContext(session, invocationMethod, ownerAdapter, getIdentifier(), where);
     }
 
     // /////////////////////////////////////////////////////////////
@@ -73,8 +74,8 @@ public class OneToManyAssociationImpl ex
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter) {
-        return new CollectionUsabilityContext(session, invocationMethod, ownerAdapter, getIdentifier());
+    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter, Where where) {
+        return new CollectionUsabilityContext(session, invocationMethod, ownerAdapter, getIdentifier(), where);
     }
 
     // /////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/OneToOneAssociationImpl.java Tue Sep  4 00:50:04 2012
@@ -21,6 +21,7 @@ package org.apache.isis.core.metamodel.s
 
 import java.util.List;
 
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.query.Query;
 import org.apache.isis.applib.query.QueryFindAllInstances;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
@@ -64,8 +65,8 @@ public class OneToOneAssociationImpl ext
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter) {
-        return new PropertyVisibilityContext(session, invocationMethod, ownerAdapter, getIdentifier());
+    public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter, Where where) {
+        return new PropertyVisibilityContext(session, invocationMethod, ownerAdapter, getIdentifier(), where);
     }
 
     // /////////////////////////////////////////////////////////////
@@ -73,8 +74,8 @@ public class OneToOneAssociationImpl ext
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter) {
-        return new PropertyUsabilityContext(session, invocationMethod, ownerAdapter, getIdentifier());
+    public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter ownerAdapter, Where where) {
+        return new PropertyUsabilityContext(session, invocationMethod, ownerAdapter, getIdentifier(), where);
     }
 
     // /////////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/util/Dump.java Tue Sep  4 00:50:04 2012
@@ -23,6 +23,7 @@ import java.util.List;
 
 import com.google.common.collect.Lists;
 
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.commons.debug.DebugBuilder;
 import org.apache.isis.core.commons.debug.DebugString;
@@ -47,6 +48,13 @@ public final class Dump {
 
     private static DebugBuilder debugBuilder;
 
+    // REVIEW: should provide this rendering context, rather than hardcoding.
+    // the net effect currently is that class members annotated with 
+    // @Hidden(where=Where.ANYWHERE) or @Disabled(where=Where.ANYWHERE) will indeed
+    // be hidden/disabled, but will be visible/enabled (perhaps incorrectly) 
+    // for any other value for Where
+    private final static Where where = Where.ANYWHERE;
+
     private Dump() {
     }
 
@@ -507,7 +515,7 @@ public final class Dump {
                 final String name = field.getId();
                 graphIndent(level, s);
 
-                if (field.isVisible(authenticationSession, adapter).isVetoed()) {
+                if (field.isVisible(authenticationSession, adapter, where).isVetoed()) {
                     s.append(name + ": (not visible)");
                     s.append("\n");
                 } else {

Modified: incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/feature/ObjectAssociationFiltersTest_visibleWhere.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/feature/ObjectAssociationFiltersTest_visibleWhere.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/feature/ObjectAssociationFiltersTest_visibleWhere.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/feature/ObjectAssociationFiltersTest_visibleWhere.java Tue Sep  4 00:50:04 2012
@@ -52,10 +52,10 @@ public class ObjectAssociationFiltersTes
     @Parameters
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][]{
-                {When.ALWAYS, Where.EVERYWHERE, Where.EVERYWHERE, false},
-                {When.UNTIL_PERSISTED, Where.EVERYWHERE, Where.EVERYWHERE, true},
-                {When.ONCE_PERSISTED, Where.EVERYWHERE, Where.EVERYWHERE, true},
-                {When.NEVER, Where.EVERYWHERE, Where.EVERYWHERE, true},
+                {When.ALWAYS, Where.ANYWHERE, Where.ANYWHERE, false},
+                {When.UNTIL_PERSISTED, Where.ANYWHERE, Where.ANYWHERE, true},
+                {When.ONCE_PERSISTED, Where.ANYWHERE, Where.ANYWHERE, true},
+                {When.NEVER, Where.ANYWHERE, Where.ANYWHERE, true},
                 {When.ALWAYS, Where.OBJECT_FORM, Where.OBJECT_FORM, false},
                 {When.ALWAYS, Where.OBJECT_FORM, Where.ALL_TABLES, true},
                 {When.ALWAYS, Where.OBJECT_FORM, Where.PARENTED_TABLE, true},
@@ -95,7 +95,7 @@ public class ObjectAssociationFiltersTes
     
     @Test
     public void test() {
-        final Filter<ObjectAssociation> filter = ObjectAssociationFilters.visibleWhere(whereContext);
+        final Filter<ObjectAssociation> filter = ObjectAssociationFilters.staticallyVisible(whereContext);
         assertThat(filter.accept(mockObjectAssociation), is(expectedVisibility));
     }
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFiltersTests.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFiltersTests.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFiltersTests.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/spec/feature/ObjectAssociationFiltersTests.java Tue Sep  4 00:50:04 2012
@@ -20,48 +20,39 @@
 package org.apache.isis.core.metamodel.spec.feature;
 
 import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.After;
-import org.junit.Before;
+import org.jmock.auto.Mock;
+import org.junit.Rule;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.core.commons.authentication.AuthenticationSession;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.hide.HiddenFacet;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
 
-@RunWith(JMock.class)
 public class ObjectAssociationFiltersTests {
 
-    private final Mockery mockery = new JUnit4Mockery();
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
 
+    @Mock
     private AuthenticationSession mockSession;
+    @Mock
     private ObjectAdapter mockTarget;
+    @Mock
     private ObjectAssociation mockAssociation;
 
-    @Before
-    public void setUp() throws Exception {
-        mockSession = mockery.mock(AuthenticationSession.class);
-        mockTarget = mockery.mock(ObjectAdapter.class, "target");
-        mockAssociation = mockery.mock(ObjectAssociation.class);
-    }
-
-    @After
-    public void tearDown() throws Exception {
-    }
-
     @Test
     public void shouldNotJustCheckIfAssociationContainsHiddenFacet() {
-        mockery.checking(new Expectations() {
+        context.checking(new Expectations() {
             {
                 never(mockAssociation).containsFacet(HiddenFacet.class);
-                allowing(mockAssociation).isVisible(with(any(AuthenticationSession.class)), with(any(ObjectAdapter.class)));
+                allowing(mockAssociation).isVisible(with(any(AuthenticationSession.class)), with(any(ObjectAdapter.class)), Where.ANYWHERE);
             }
         });
-        final Filter<ObjectAssociation> filter = ObjectAssociationFilters.dynamicallyVisible(mockSession, mockTarget);
+        final Filter<ObjectAssociation> filter = ObjectAssociationFilters.dynamicallyVisible(mockSession, mockTarget, Where.ANYWHERE);
         filter.accept(mockAssociation);
     }
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest.java Tue Sep  4 00:50:04 2012
@@ -101,12 +101,12 @@ public class ObjectAssociationAbstractTe
             }
 
             @Override
-            public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target) {
+            public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, Where where) {
                 return null;
             }
 
             @Override
-            public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter) {
+            public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter, Where where) {
                 return null;
             }
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest_alwaysHidden.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest_alwaysHidden.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest_alwaysHidden.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectAssociationAbstractTest_alwaysHidden.java Tue Sep  4 00:50:04 2012
@@ -102,12 +102,12 @@ public class ObjectAssociationAbstractTe
             }
 
             @Override
-            public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target) {
+            public UsabilityContext<?> createUsableInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter target, Where where) {
                 return null;
             }
 
             @Override
-            public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter) {
+            public VisibilityContext<?> createVisibleInteractionContext(final AuthenticationSession session, final InteractionInvocationMethod invocationMethod, final ObjectAdapter targetObjectAdapter, Where where) {
                 return null;
             }
 
@@ -145,7 +145,7 @@ public class ObjectAssociationAbstractTe
         context.checking(new Expectations() {
             {
                 allowing(facet).where();
-                will(returnValue(Where.EVERYWHERE));
+                will(returnValue(Where.ANYWHERE));
             }
         });
         facetedMethod.addFacet(facet);

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/collections/disabled/fromimmutable/DisabledFacetForCollectionDerivedFromImmutable.java Tue Sep  4 00:50:04 2012
@@ -28,7 +28,7 @@ import org.apache.isis.core.progmodel.fa
 public class DisabledFacetForCollectionDerivedFromImmutable extends DisabledFacetAbstract {
 
     public DisabledFacetForCollectionDerivedFromImmutable(final ImmutableFacet immutableFacet, final FacetHolder holder) {
-        super(immutableFacet.when(), Where.EVERYWHERE, holder);
+        super(immutableFacet.when(), Where.ANYWHERE, holder);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/DisabledFacetNever.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/DisabledFacetNever.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/DisabledFacetNever.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/DisabledFacetNever.java Tue Sep  4 00:50:04 2012
@@ -27,7 +27,7 @@ import org.apache.isis.core.metamodel.fa
 public class DisabledFacetNever extends DisabledFacetAbstract {
 
     public DisabledFacetNever(final FacetHolder holder) {
-        super(When.NEVER, Where.EVERYWHERE, holder);
+        super(When.NEVER, Where.ANYWHERE, holder);
     }
 
     /**

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/staticmethod/DisabledFacetAlwaysEverywhere.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/staticmethod/DisabledFacetAlwaysEverywhere.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/staticmethod/DisabledFacetAlwaysEverywhere.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/disable/staticmethod/DisabledFacetAlwaysEverywhere.java Tue Sep  4 00:50:04 2012
@@ -28,7 +28,7 @@ import org.apache.isis.core.progmodel.fa
 public class DisabledFacetAlwaysEverywhere extends DisabledFacetAbstract {
 
     public DisabledFacetAlwaysEverywhere(final FacetHolder holder) {
-        super(When.ALWAYS, Where.EVERYWHERE, holder);
+        super(When.ALWAYS, Where.ANYWHERE, holder);
     }
 
     /**

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetAbstract.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetAbstract.java Tue Sep  4 00:50:04 2012
@@ -40,7 +40,7 @@ public abstract class HiddenFacetAbstrac
 
     @Override
     public String hides(final VisibilityContext<? extends VisibilityEvent> ic) {
-        return hiddenReason(ic.getTarget());
+        return hiddenReason(ic.getTarget(), ic.getWhere());
     }
 
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetImpl.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetImpl.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetImpl.java Tue Sep  4 00:50:04 2012
@@ -31,10 +31,15 @@ public class HiddenFacetImpl extends Hid
     }
 
     @Override
-    public String hiddenReason(final ObjectAdapter targetAdapter) {
+    public String hiddenReason(final ObjectAdapter targetAdapter, Where whereContext) {
+        if(!where().includes(whereContext)) {
+            return null;
+        }
+        
         if (when() == When.ALWAYS) {
             return "Always hidden";
-        } else if (when() == When.NEVER) {
+        }
+        if (when() == When.NEVER) {
             return null;
         }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetNever.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetNever.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetNever.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/HiddenFacetNever.java Tue Sep  4 00:50:04 2012
@@ -27,14 +27,14 @@ import org.apache.isis.core.metamodel.fa
 public class HiddenFacetNever extends HiddenFacetAbstract {
 
     public HiddenFacetNever(final FacetHolder holder) {
-        super(When.NEVER, Where.EVERYWHERE, holder);
+        super(When.NEVER, Where.ANYWHERE, holder);
     }
 
     /**
      * Always returns <tt>null</tt>.
      */
     @Override
-    public String hiddenReason(final ObjectAdapter target) {
+    public String hiddenReason(final ObjectAdapter target, Where where) {
         return null;
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlwaysEverywhere.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlwaysEverywhere.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlwaysEverywhere.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/members/hide/staticmethod/HiddenFacetAlwaysEverywhere.java Tue Sep  4 00:50:04 2012
@@ -28,14 +28,14 @@ import org.apache.isis.core.progmodel.fa
 public class HiddenFacetAlwaysEverywhere extends HiddenFacetAbstract {
 
     public HiddenFacetAlwaysEverywhere(final FacetHolder holder) {
-        super(When.ALWAYS, Where.EVERYWHERE, holder);
+        super(When.ALWAYS, Where.ANYWHERE, holder);
     }
 
     /**
      * Always returns <i>Always hidden</i>.
      */
     @Override
-    public String hiddenReason(final ObjectAdapter target) {
+    public String hiddenReason(final ObjectAdapter target, Where where) {
         return "Always hidden";
     }
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/hidden/HiddenFacetForTypeAnnotation.java Tue Sep  4 00:50:04 2012
@@ -27,7 +27,7 @@ import org.apache.isis.core.progmodel.fa
 public class HiddenFacetForTypeAnnotation extends HiddenFacetImpl {
 
     public HiddenFacetForTypeAnnotation(final When when, final FacetHolder holder) {
-        super(when, Where.EVERYWHERE, holder);
+        super(when, Where.ANYWHERE, holder);
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/validprops/ObjectValidPropertiesFacetImpl.java Tue Sep  4 00:50:04 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.progmodel.facets.object.validprops;
 
+import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.interactions.ObjectValidityContext;
@@ -28,6 +29,13 @@ import org.apache.isis.core.metamodel.sp
 
 public class ObjectValidPropertiesFacetImpl extends ObjectValidPropertiesFacetAbstract {
 
+    // REVIEW: should provide this rendering context, rather than hardcoding.
+    // the net effect currently is that class members annotated with 
+    // @Hidden(where=Where.ANYWHERE) or @Disabled(where=Where.ANYWHERE) will indeed
+    // be hidden/disabled, but will be visible/enabled (perhaps incorrectly) 
+    // for any other value for Where
+    private final Where where = Where.ANYWHERE;
+
     public ObjectValidPropertiesFacetImpl(final FacetHolder holder) {
         super(holder);
     }
@@ -38,11 +46,11 @@ public class ObjectValidPropertiesFacetI
         final ObjectAdapter adapter = context.getTarget();
         for (final ObjectAssociation property : adapter.getSpecification().getAssociations(ObjectAssociationFilters.PROPERTIES)) {
             // ignore hidden properties
-            if (property.isVisible(context.getSession(), adapter).isVetoed()) {
+            if (property.isVisible(context.getSession(), adapter, where).isVetoed()) {
                 continue;
             }
             // ignore disabled properties
-            if (property.isUsable(context.getSession(), adapter).isVetoed()) {
+            if (property.isUsable(context.getSession(), adapter, where).isVetoed()) {
                 continue;
             }
             final OneToOneAssociation otoa = (OneToOneAssociation) property;

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutable.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutable.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutable.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/properties/disabled/fromimmutable/DisabledFacetForPropertyDerivedFromImmutable.java Tue Sep  4 00:50:04 2012
@@ -28,7 +28,7 @@ import org.apache.isis.core.progmodel.fa
 public class DisabledFacetForPropertyDerivedFromImmutable extends DisabledFacetAbstract {
 
     public DisabledFacetForPropertyDerivedFromImmutable(final ImmutableFacet immutableFacet, final FacetHolder holder) {
-        super(immutableFacet.when(), Where.EVERYWHERE, holder);
+        super(immutableFacet.when(), Where.ANYWHERE, holder);
     }
 
     @Override

Modified: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/disable/DisabledAnnotationFacetFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/disable/DisabledAnnotationFacetFactoryTest.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/disable/DisabledAnnotationFacetFactoryTest.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/disable/DisabledAnnotationFacetFactoryTest.java Tue Sep  4 00:50:04 2012
@@ -164,7 +164,7 @@ public class DisabledAnnotationFacetFact
         final DisabledFacetAbstract disabledFacetAbstract = (DisabledFacetAbstract) facet;
 
         assertEquals(When.UNTIL_PERSISTED, disabledFacetAbstract.when());
-        assertEquals(Where.EVERYWHERE, disabledFacetAbstract.where());
+        assertEquals(Where.ANYWHERE, disabledFacetAbstract.where());
     }
 
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/hide/HiddenAnnotationFacetFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/hide/HiddenAnnotationFacetFactoryTest.java?rev=1380413&r1=1380412&r2=1380413&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/hide/HiddenAnnotationFacetFactoryTest.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/hide/HiddenAnnotationFacetFactoryTest.java Tue Sep  4 00:50:04 2012
@@ -164,7 +164,7 @@ public class HiddenAnnotationFacetFactor
         final HiddenFacetAbstract hiddenFacetAbstract = (HiddenFacetAbstract) facet;
 
         assertEquals(When.UNTIL_PERSISTED, hiddenFacetAbstract.when());
-        assertEquals(Where.EVERYWHERE, hiddenFacetAbstract.where());
+        assertEquals(Where.ANYWHERE, hiddenFacetAbstract.where());
     }
 
     public void testHiddenWhereCollectionTableAnnotationPickedUpOn() {



Mime
View raw message