incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1386814 [1/2] - in /incubator/isis/trunk/framework: core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/ core/metamodel/src/main...
Date Mon, 17 Sep 2012 20:28:40 GMT
Author: danhaywood
Date: Mon Sep 17 20:28:37 2012
New Revision: 1386814

URL: http://svn.apache.org/viewvc?rev=1386814&view=rev
Log:
ISIS-232: upgrading to Wicket 6.0.0, also...

* initial work on autocomplete
* when building metamodel, now deals with introspecting same spec twice.

Added:
    incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/java/viewer/wicket/app/application.css
      - copied, changed from r1386804, incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/webapp/application.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/IFormSubmitterWithPreSubmitHook.java
      - copied, changed from r1386804, incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/IFormSubmittingComponentWithPreSubmitHook.java
Removed:
    incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/webapp/application.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/banner.pdn
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/banner.png
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/IFormSubmittingComponentWithPreSubmitHook.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_init.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/app/wicket/WebRequestCycleForIsisTest.java
Modified:
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderDelegator.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionFilters.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/objectlist/ObjectSpecificationForFreeStandingList.java
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ProgrammableReflector.java
    incubator/isis/trunk/framework/viewer/wicket/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java
    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/models/EntityModel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ImageResourceCache.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.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/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/columns/ColumnAbstract.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/icontitle/EntityIconAndTitlePanel.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/entity/blocks/summary/EntitySummaryPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldNumeric.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/image/JavaAwtImagePanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/jdkmath/JavaMathBigIntegerPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/string/MultiLineStringPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/unknown/UnknownModelPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/widgets/buttons/ContainedButton.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/valuechoices/ValueChoicesPanel.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.css
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/PageAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/about/AboutPage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/action/ActionPage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/home/HomePage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/login/WicketSignInPage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/AjaxButtonWithPreSubmitHook.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/ButtonWithPreSubmitHook.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/FormAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/panels/PanelAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/selector/SelectorPanelAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/tabs/TabbedPanelAbstract.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/util/EvenOrOddCssClassAppenderFactory.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/util/Links.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/zzz/cssplaytime/CssPlaytimePage.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/pom.xml
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/images/Images.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/IsisWicketUnsecuredApplication.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/imagecache/ImageCacheClassPath.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/isis/IsisContextForWicket.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/AnonymousWebSessionForIsis.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/AuthenticatedWebSessionForIsis.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapter.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/ConverterForObjectAdapterMemento.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/integration/wicket/WebRequestCycleForIsis.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryListDefault.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/registries/components/ComponentFactoryRegistryDefault.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/IsisWicketApplication_Defaults.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/app/wicket/AuthenticatedWebSessionForIsis_Authenticate.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/app/wicket/AuthenticatedWebSessionForIsis_Instantiation.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/app/wicket/AuthenticatedWebSessionForIsis_SignIn.java
    incubator/isis/trunk/framework/viewer/wicket/wicket-viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/app/wicket/AuthenticatedWebSessionForIsis_ThreadManagement.java

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacet.java Mon Sep 17 20:28:37 2012
@@ -20,9 +20,8 @@
 package org.apache.isis.core.metamodel.facets.object.autocomplete;
 
 import org.apache.isis.core.metamodel.facetapi.Facet;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 
 public interface AutoCompleteFacet extends Facet {
-    public ObjectSpecification getRepositorySpec();
-    public String getActionId();
+    public ObjectAction getRepositoryAction();
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/autocomplete/AutoCompleteFacetAbstract.java Mon Sep 17 20:28:37 2012
@@ -22,7 +22,7 @@ package org.apache.isis.core.metamodel.f
 import org.apache.isis.core.metamodel.facetapi.Facet;
 import org.apache.isis.core.metamodel.facetapi.FacetAbstract;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 
 public abstract class AutoCompleteFacetAbstract extends FacetAbstract implements AutoCompleteFacet {
 
@@ -30,21 +30,16 @@ public abstract class AutoCompleteFacetA
         return AutoCompleteFacet.class;
     }
 
-    private final ObjectSpecification repositorySpec;
-    private final String actionId;
+    private final ObjectAction repositoryAction;
 
-    public AutoCompleteFacetAbstract(final FacetHolder holder, ObjectSpecification repositorySpec, String actionId) {
+    public AutoCompleteFacetAbstract(final FacetHolder holder, ObjectAction repositoryAction) {
         super(type(), holder, Derivation.NOT_DERIVED);
-        this.repositorySpec = repositorySpec;
-        this.actionId = actionId;
+        this.repositoryAction = repositoryAction;
     }
 
-    public ObjectSpecification getRepositorySpec() {
-        return repositorySpec;
-    }
-    
-    public String getActionId() {
-        return actionId;
+    @Override
+    public ObjectAction getRepositoryAction() {
+        return repositoryAction;
     }
 
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/runtimecontext/RuntimeContextAbstract.java Mon Sep 17 20:28:37 2012
@@ -130,6 +130,11 @@ public abstract class RuntimeContextAbst
             public boolean loaded(String fullyQualifiedClassName) {
                 return specificationLoader.loaded(fullyQualifiedClassName);
             }
+
+            @Override
+            public ObjectSpecification introspectIfRequired(ObjectSpecification spec) {
+                return specificationLoader.introspectIfRequired(spec);
+            }
         });
     }
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/ObjectSpecification.java Mon Sep 17 20:28:37 2012
@@ -325,31 +325,7 @@ public interface ObjectSpecification ext
 
     public void markAsService();
 
-    // //////////////////////////////////////////////////////////////
-    // Introspection
-    // //////////////////////////////////////////////////////////////
 
-    /**
-     * Builds actions and associations.
-     * 
-     * <p>
-     * Is called prior to running the <tt>FacetDecoratorSet</tt>
-     */
-    public void introspectTypeHierarchyAndMembers();
-
-    /**
-     * Is called after to running the <tt>FacetDecoratorSet</tt>.
-     * 
-     * <p>
-     * TODO: it's possible that this could be merged with
-     * {@link #introspectTypeHierarchyAndMembers()}; need to check though,
-     * because this would cause facets to be decorated at the end of
-     * introspection, rather than midway as is currently.
-     * 
-     */
-    public void updateFromFacetValues();
-
-    public boolean isIntrospected();
 
 
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoader.java Mon Sep 17 20:28:37 2012
@@ -20,13 +20,13 @@ import java.util.Collection;
 import java.util.List;
 
 import org.apache.isis.core.commons.components.Injectable;
+import org.apache.isis.core.metamodel.facets.FacetFactory;
+import org.apache.isis.core.metamodel.facets.object.autocomplete.AutoCompleteFacet;
 
 public interface SpecificationLoader extends Injectable {
 
     ObjectSpecification lookupBySpecId(ObjectSpecId objectSpecId);
 
-
-
     /**
      * Return the specification for the specified class of object.
      * 
@@ -50,9 +50,18 @@ public interface SpecificationLoader ext
      * Loads the specifications of the specified types except the one specified
      * (to prevent an infinite loop).
      */
-    public boolean loadSpecifications(List<Class<?>> typesToLoad, final Class<?> typeToIgnore);
+    boolean loadSpecifications(List<Class<?>> typesToLoad, final Class<?> typeToIgnore);
 
 
+    /**
+     * Typically does not need to be called, but is available for {@link FacetFactory}s to force
+     * early introspection of referenced specs in certain circumstances.
+     * 
+     * <p>
+     * Originally introduced to support {@link AutoCompleteFacet}.
+     */
+    ObjectSpecification introspectIfRequired(final ObjectSpecification spec);
+    
     
     Collection<ObjectSpecification> allSpecifications();
 

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderDelegator.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderDelegator.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderDelegator.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/SpecificationLoaderDelegator.java Mon Sep 17 20:28:37 2012
@@ -76,7 +76,11 @@ public class SpecificationLoaderDelegato
         return specificationLoaderDelegate.loadSpecifications(typesToLoad);
     }
 
-    
+    @Override
+    public ObjectSpecification introspectIfRequired(ObjectSpecification spec) {
+        return specificationLoaderDelegate.introspectIfRequired(spec);
+    }
+
     @Override
     public void injectInto(Object candidate) {
         super.injectInto(candidate);
@@ -85,4 +89,7 @@ public class SpecificationLoaderDelegato
         }
     }
 
+
+
+
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionFilters.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionFilters.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionFilters.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/spec/feature/ObjectActionFilters.java Mon Sep 17 20:28:37 2012
@@ -18,4 +18,13 @@ public class ObjectActionFilters {
         };
     }
 
+    public static Filter<ObjectAction> withId(final String actionId) {
+        return new Filter<ObjectAction>(){
+    
+            @Override
+            public boolean accept(ObjectAction objectAction) {
+                return objectAction.getId().equals(actionId);
+            }};
+    }
+
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/ObjectReflectorDefault.java Mon Sep 17 20:28:37 2012
@@ -73,6 +73,8 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.specloader.specimpl.CreateObjectContext;
 import org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilderContext;
 import org.apache.isis.core.metamodel.specloader.specimpl.IntrospectionContext;
+import org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract;
+import org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.IntrospectionState;
 import org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault;
 import org.apache.isis.core.metamodel.specloader.specimpl.objectlist.ObjectSpecificationForFreeStandingList;
 import org.apache.isis.core.metamodel.specloader.traverser.SpecificationTraverser;
@@ -373,7 +375,7 @@ public class ObjectReflectorDefault impl
             // infinite loops
             specificationCache.cache(typeName, specification);
 
-            introspectSpecificationIfRequired(specification);
+            introspectIfRequired(specification);
 
             return specification;
         }
@@ -456,11 +458,29 @@ public class ObjectReflectorDefault impl
         return getCache().get(fullyQualifiedClassName) != null;
     }
 
-    private ObjectSpecification introspectSpecificationIfRequired(final ObjectSpecification spec) {
-        if (!spec.isIntrospected()) {
-            spec.introspectTypeHierarchyAndMembers();
+    public ObjectSpecification introspectIfRequired(final ObjectSpecification spec) {
+        final ObjectSpecificationAbstract specSpi = (ObjectSpecificationAbstract)spec;
+        final IntrospectionState introspectionState = specSpi.getIntrospectionState();
+
+        if (introspectionState == IntrospectionState.NOT_INTROSPECTED) {
+            specSpi.setIntrospectionState(IntrospectionState.BEING_INTROSPECTED);
+            
+            specSpi.introspectTypeHierarchyAndMembers();
             facetDecoratorSet.decorate(spec);
-            spec.updateFromFacetValues();
+            specSpi.updateFromFacetValues();
+            
+            specSpi.setIntrospectionState(IntrospectionState.INTROSPECTED);
+        } else if (introspectionState == IntrospectionState.BEING_INTROSPECTED) {
+            // nothing to do
+
+            specSpi.introspectTypeHierarchyAndMembers();
+            facetDecoratorSet.decorate(spec);
+            specSpi.updateFromFacetValues();
+            
+            specSpi.setIntrospectionState(IntrospectionState.INTROSPECTED);
+
+        } else if (introspectionState == IntrospectionState.INTROSPECTED) {
+            // nothing to do
         }
         return spec;
     }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java Mon Sep 17 20:28:37 2012
@@ -80,7 +80,6 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.spec.SpecificationContext;
 import org.apache.isis.core.metamodel.spec.SpecificationLoader;
 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.ObjectActionParameter;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAssociationFilters;
@@ -96,6 +95,9 @@ public abstract class ObjectSpecificatio
         private final List<ObjectSpecification> classes = Lists.newArrayList();
 
         public void addSubclass(final ObjectSpecification subclass) {
+            if(classes.contains(subclass)) { 
+                return;
+            }
             classes.add(subclass);
         }
 
@@ -142,7 +144,7 @@ public abstract class ObjectSpecificatio
     private TitleFacet titleFacet;
     private IconFacet iconFacet;
 
-    private boolean introspected = false;
+    private IntrospectionState introspected = IntrospectionState.NOT_INTROSPECTED;
 
     // //////////////////////////////////////////////////////////////////////
     // Constructor
@@ -219,24 +221,36 @@ public abstract class ObjectSpecificatio
         return fullName;
     }
 
+    
+    public enum IntrospectionState {
+        NOT_INTROSPECTED,
+        BEING_INTROSPECTED,
+        INTROSPECTED,
+    }
+
     /**
      * Only if {@link #setIntrospected(boolean)} has been called (should be
      * called within {@link #updateFromFacetValues()}.
      */
-    @Override
-    public boolean isIntrospected() {
+    public IntrospectionState getIntrospectionState() {
         return introspected;
     }
 
+    public void setIntrospectionState(IntrospectionState introspectationState) {
+        this.introspected = introspectationState;
+    }
+
     // //////////////////////////////////////////////////////////////////////
     // Introspection (part 1)
     // //////////////////////////////////////////////////////////////////////
 
+    public abstract void introspectTypeHierarchyAndMembers();
+
     /**
      * Intended to be called within {@link #introspectTypeHierarchyAndMembers()}
      * .
      */
-    protected void setSuperclass(final Class<?> superclass) {
+    protected void updateSuperclass(final Class<?> superclass) {
         if (superclass == null) {
             return;
         }
@@ -245,7 +259,7 @@ public abstract class ObjectSpecificatio
             if (LOG.isDebugEnabled()) {
                 LOG.debug("  Superclass " + superclass.getName());
             }
-            addAsSubclassTo(superclassSpec);
+            updateAsSubclassTo(superclassSpec);
         }
     }
 
@@ -253,7 +267,8 @@ public abstract class ObjectSpecificatio
      * Intended to be called within {@link #introspectTypeHierarchyAndMembers()}
      * .
      */
-    protected void addInterfaces(final List<ObjectSpecification> interfaces) {
+    protected void updateInterfaces(final List<ObjectSpecification> interfaces) {
+        this.interfaces.clear();
         this.interfaces.addAll(interfaces);
     }
 
@@ -261,27 +276,27 @@ public abstract class ObjectSpecificatio
      * Intended to be called within {@link #introspectTypeHierarchyAndMembers()}
      * .
      */
-    protected void addAsSubclassTo(final ObjectSpecification supertypeSpec) {
+    protected void updateAsSubclassTo(final ObjectSpecification supertypeSpec) {
         if (!(supertypeSpec instanceof ObjectSpecificationAbstract)) {
             return;
         }
         // downcast required because addSubclass is (deliberately) not public
         // API
         final ObjectSpecificationAbstract introspectableSpec = (ObjectSpecificationAbstract) supertypeSpec;
-        introspectableSpec.addSubclass(this);
+        introspectableSpec.updateSubclasses(this);
     }
 
     /**
      * Intended to be called within {@link #introspectTypeHierarchyAndMembers()}
      * .
      */
-    protected void addAsSubclassTo(final List<ObjectSpecification> supertypeSpecs) {
+    protected void updateAsSubclassTo(final List<ObjectSpecification> supertypeSpecs) {
         for (final ObjectSpecification supertypeSpec : supertypeSpecs) {
-            addAsSubclassTo(supertypeSpec);
+            updateAsSubclassTo(supertypeSpec);
         }
     }
 
-    private void addSubclass(final ObjectSpecification subclass) {
+    private void updateSubclasses(final ObjectSpecification subclass) {
         this.subclasses.addSubclass(subclass);
     }
 
@@ -289,10 +304,11 @@ public abstract class ObjectSpecificatio
      * Intended to be called within {@link #introspectTypeHierarchyAndMembers()}
      * .
      */
-    protected void addAssociations(final List<ObjectAssociation> associations) {
+    protected void updateAssociations(final List<ObjectAssociation> associations) {
         if (associations == null) {
             return;
         }
+        this.associations.clear();
         this.associations.addAll(associations);
     }
 
@@ -300,10 +316,11 @@ public abstract class ObjectSpecificatio
      * Intended to be called within {@link #introspectTypeHierarchyAndMembers()}
      * .
      */
-    protected void addObjectActions(final List<ObjectAction> objectActions) {
+    protected void updateObjectActions(final List<ObjectAction> objectActions) {
         if (objectActions == null) {
             return;
         }
+        this.objectActions.clear();
         this.objectActions.addAll(objectActions);
     }
 
@@ -311,7 +328,6 @@ public abstract class ObjectSpecificatio
     // Introspection (part 2)
     // //////////////////////////////////////////////////////////////////////
 
-    @Override
     public void updateFromFacetValues() {
         clearDirtyObjectFacet = getFacet(ClearDirtyObjectFacet.class);
         markDirtyObjectFacet = getFacet(MarkDirtyObjectFacet.class);
@@ -320,8 +336,7 @@ public abstract class ObjectSpecificatio
         titleFacet = getFacet(TitleFacet.class);
         iconFacet = getFacet(IconFacet.class);
 
-        final Persistability persistability = determinePersistability();
-        this.persistability = persistability;
+        this.persistability = determinePersistability();
     }
 
     private Persistability determinePersistability() {
@@ -347,12 +362,6 @@ public abstract class ObjectSpecificatio
         this.clearDirtyObjectFacet = clearDirtyObjectFacet;
     }
 
-    /**
-     * Intended to be called within {@link #updateFromFacetValues()}.
-     */
-    protected void setIntrospected(final boolean introspected) {
-        this.introspected = introspected;
-    }
 
     // //////////////////////////////////////////////////////////////////////
     // Title, Icon
@@ -995,4 +1004,5 @@ public abstract class ObjectSpecificatio
     public SpecificationLoader getSpecificationLookup() {
         return specificationLookup;
     }
+
 }

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/dflt/ObjectSpecificationDefault.java Mon Sep 17 20:28:37 2012
@@ -77,6 +77,7 @@ import org.apache.isis.core.metamodel.sp
 import org.apache.isis.core.metamodel.specloader.specimpl.IntrospectionContext;
 import org.apache.isis.core.metamodel.specloader.specimpl.ObjectActionImpl;
 import org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract;
+import org.apache.isis.core.metamodel.specloader.specimpl.ObjectSpecificationAbstract.IntrospectionState;
 import org.apache.isis.core.metamodel.specloader.specimpl.OneToManyAssociationImpl;
 import org.apache.isis.core.metamodel.specloader.specimpl.OneToOneAssociationImpl;
 
@@ -123,15 +124,16 @@ public class ObjectSpecificationDefault 
 
     @Override
     public void introspectTypeHierarchyAndMembers() {
-        if (facetedMethodsBuilder == null) {
-            throw new MetaModelException("Introspection already taken place, cannot introspect again");
-        }
 
         // class
-        facetedMethodsBuilder.introspectClass();
-
-        // names
-        addNamedFacetAndPluralFacetIfRequired();
+        if(isNotIntrospected()) {
+            facetedMethodsBuilder.introspectClass();
+        }
+        
+        // name
+        if(isNotIntrospected()) {
+            addNamedFacetAndPluralFacetIfRequired();
+        }
 
         // go no further if a value
         if(this.containsFacet(ValueFacet.class)) {
@@ -142,8 +144,10 @@ public class ObjectSpecificationDefault 
         }
 
         // superclass
-        final Class<?> superclass = getCorrespondingClass().getSuperclass();
-        setSuperclass(superclass);
+        if(isNotIntrospected()) {
+            final Class<?> superclass = getCorrespondingClass().getSuperclass();
+            updateSuperclass(superclass);
+        }
 
 
         // walk superinterfaces
@@ -165,27 +169,39 @@ public class ObjectSpecificationDefault 
                 interfaceSpecList.add(interfaceSpec);
             }
         }
-        addAsSubclassTo(interfaceSpecList);
-        addInterfaces(interfaceSpecList);
+
+        if(isNotIntrospected()) {
+            updateAsSubclassTo(interfaceSpecList);
+        }
+        if(isNotIntrospected()) {
+            updateInterfaces(interfaceSpecList);
+        }
 
         // associations and actions
         final List<FacetedMethod> associationFacetedMethods = facetedMethodsBuilder.getAssociationFacetedMethods();
-        // actions
         final List<FacetedMethod> actionFacetedMethods = facetedMethodsBuilder.getActionFacetedMethods();
 
-        // ordering
-        final OrderSet associationOrderSet = getMemberLayoutArranger().createAssociationOrderSetFor(this, associationFacetedMethods);
-        addAssociations(asAssociations(associationOrderSet));
-
-        final OrderSet actionOrderSet = getMemberLayoutArranger().createActionOrderSetFor(this, actionFacetedMethods);
-        addObjectActions(asObjectActions(actionOrderSet));
+        if(isNotIntrospected()) {
+            final OrderSet associationOrderSet = getMemberLayoutArranger().createAssociationOrderSetFor(this, associationFacetedMethods);
+            updateAssociations(asAssociations(associationOrderSet));
+        }
 
-        facetedMethodsBuilder.introspectClassPostProcessing();
+        if(isNotIntrospected()) {
+            final OrderSet actionOrderSet = getMemberLayoutArranger().createActionOrderSetFor(this, actionFacetedMethods);
+            updateObjectActions(asObjectActions(actionOrderSet));
+        }
 
-        updateFromFacetValues();
+        if(isNotIntrospected()) {
+            facetedMethodsBuilder.introspectClassPostProcessing();    
+        }
+        
+        if(isNotIntrospected()) {
+            updateFromFacetValues();    
+        }
+    }
 
-        facetedMethodsBuilder = null;
-        setIntrospected(true);
+    private boolean isNotIntrospected() {
+        return !(getIntrospectionState() == IntrospectionState.INTROSPECTED);
     }
 
     private void addNamedFacetAndPluralFacetIfRequired() {
@@ -262,13 +278,8 @@ public class ObjectSpecificationDefault 
         return new ObjectActionSet("", set.getGroupFullName(), asObjectActions(set));
     }
 
-    /**
-     * Added to try to track down a race condition.
-     */
-    @Override
-    public boolean isIntrospected() {
-        return facetedMethodsBuilder == null;
-    }
+    
+
 
     // //////////////////////////////////////////////////////////////////////
     // Whether a service or not

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/objectlist/ObjectSpecificationForFreeStandingList.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/objectlist/ObjectSpecificationForFreeStandingList.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/objectlist/ObjectSpecificationForFreeStandingList.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/objectlist/ObjectSpecificationForFreeStandingList.java Mon Sep 17 20:28:37 2012
@@ -59,7 +59,7 @@ public class ObjectSpecificationForFreeS
 
     @Override
     public void introspectTypeHierarchyAndMembers() {
-        setSuperclass(Object.class);
+        updateSuperclass(Object.class);
 
         addFacet(new CollectionFacetForFreeStandingList(this));
         addFacet(new TypeOfFacetDefaultToObject(this, getSpecificationLookup()) {

Modified: incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java (original)
+++ incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/testspec/ObjectSpecificationStub.java Mon Sep 17 20:28:37 2012
@@ -458,23 +458,10 @@ public class ObjectSpecificationStub ext
     // /////////////////////////////////////////////////////////////
 
     @Override
-    public void introspectTypeHierarchyAndMembers() {
-    }
-
-    @Override
-    public void updateFromFacetValues() {
-    }
-
-    @Override
     public void markAsService() {
     }
 
     @Override
-    public boolean isIntrospected() {
-        return false;
-    }
-
-    @Override
     public List<ObjectAction> getObjectActions(final Contributed contributed) {
         return null;
     }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteAnnotationFacetFactory.java Mon Sep 17 20:28:37 2012
@@ -19,6 +19,8 @@
 
 package org.apache.isis.core.progmodel.facets.object.autocomplete.annotation;
 
+import java.util.List;
+
 import org.apache.isis.applib.annotation.AutoComplete;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facetapi.FacetUtil;
@@ -26,12 +28,16 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.Annotations;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.facets.object.autocomplete.AutoCompleteFacet;
+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;
 
 public class AutoCompleteAnnotationFacetFactory extends FacetFactoryAbstract {
 
     public AutoCompleteAnnotationFacetFactory() {
-        super(FeatureType.OBJECTS_ONLY);
+        super(FeatureType.OBJECTS_POST_PROCESSING_ONLY);
     }
 
     @Override
@@ -42,10 +48,17 @@ public class AutoCompleteAnnotationFacet
 
     private AutoCompleteFacet create(final AutoComplete annotation, final FacetHolder holder) {
         if(annotation == null) { return null; }
+
         Class<?> repositoryClass = annotation.repository();
+        String actionName = annotation.action();
+        
         final ObjectSpecification repositorySpec = getSpecificationLookup().loadSpecification(repositoryClass);
-        String action = annotation.action();
-        return annotation == null ? null : new AutoCompleteFacetAnnotation(holder, repositorySpec, action);
+        getSpecificationLookup().introspectIfRequired(repositorySpec);
+         
+        
+        final List<ObjectAction> objectActions = repositorySpec.getObjectActions(ActionType.USER, Contributed.EXCLUDED, ObjectActionFilters.withId(actionName));
+        
+        return objectActions.size() != 1 ? null : new AutoCompleteFacetAnnotation(holder, objectActions.get(0));
     }
 
 }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/autocomplete/annotation/AutoCompleteFacetAnnotation.java Mon Sep 17 20:28:37 2012
@@ -22,12 +22,12 @@ package org.apache.isis.core.progmodel.f
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
 import org.apache.isis.core.metamodel.facets.object.autocomplete.AutoCompleteFacetAbstract;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.spec.feature.ObjectAction;
 
 public class AutoCompleteFacetAnnotation extends AutoCompleteFacetAbstract {
 
-
-    public AutoCompleteFacetAnnotation(FacetHolder holder, ObjectSpecification repositorySpec, String action) {
-        super(holder, repositorySpec, action);
+    public AutoCompleteFacetAnnotation(FacetHolder holder, ObjectAction repositoryAction) {
+        super(holder, repositoryAction);
     }
 
 

Modified: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ProgrammableReflector.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ProgrammableReflector.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ProgrammableReflector.java (original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/ProgrammableReflector.java Mon Sep 17 20:28:37 2012
@@ -136,4 +136,9 @@ public class ProgrammableReflector imple
         throw new NotYetImplementedException();
     }
 
+    @Override
+    public ObjectSpecification introspectIfRequired(ObjectSpecification spec) {
+        throw new NotYetImplementedException();
+    }
+
 }

Modified: incubator/isis/trunk/framework/viewer/wicket/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/pom.xml?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/pom.xml (original)
+++ incubator/isis/trunk/framework/viewer/wicket/pom.xml Mon Sep 17 20:28:37 2012
@@ -38,8 +38,13 @@
         <siteBaseDir>../..</siteBaseDir>
 		<relativeUrl>viewer/wicket/</relativeUrl>
 
+		<wicket.version>6.0.0</wicket.version>
+		<wicketstuff.version>6.0.0</wicketstuff.version>
+
+<!-- 
 		<wicket.version>1.4.12</wicket.version>
 		<wicketstuff.version>1.4.12</wicketstuff.version>
+-->
 
         <docbkxGuideTitle>Apache Isis Wicket Viewer</docbkxGuideTitle>
         <docbkxGuideSubTitle>Customization, Configuration and Deployment Guide</docbkxGuideSubTitle>
@@ -171,6 +176,25 @@
 				<groupId>org.apache.wicket</groupId>
 				<artifactId>wicket</artifactId>
 				<version>${wicket.version}</version>
+				<type>pom</type>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.wicket</groupId>
+				<artifactId>wicket-core</artifactId>
+				<version>${wicket.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.wicket</groupId>
+				<artifactId>wicket-request</artifactId>
+				<version>${wicket.version}</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.apache.wicket</groupId>
+				<artifactId>wicket-util</artifactId>
+				<version>${wicket.version}</version>
 			</dependency>
 
 			<dependency>
@@ -197,12 +221,14 @@
 				<version>${wicket.version}</version>
 			</dependency>
 
-            <!-- Wicket & WicketStuff -->
+            <!-- WicketStuff -->
+            <!-- 
 			<dependency>
 				<groupId>org.wicketstuff</groupId>
 				<artifactId>scriptaculous</artifactId>
 				<version>${wicketstuff.version}</version>
 			</dependency>
+            -->
 			<dependency>
 				<groupId>org.wicketstuff</groupId>
 				<artifactId>objectautocomplete</artifactId>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/pom.xml?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/pom.xml (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/pom.xml Mon Sep 17 20:28:37 2012
@@ -45,8 +45,8 @@
 		</dependency>
 
 		<dependency>
-		  <groupId>org.apache.wicket</groupId>
-		  <artifactId>wicket</artifactId>
+			<groupId>org.apache.wicket</groupId>
+			<artifactId>wicket-core</artifactId>
 		</dependency>
 
 		<dependency>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/ObjectAdapterMemento.java Mon Sep 17 20:28:37 2012
@@ -259,9 +259,14 @@ public class ObjectAdapterMemento implem
         if (this.titleHint != null) {
             return;
         } 
-        ObjectAdapter objectAdapter = this.getObjectAdapter(ConcurrencyChecking.NO_CHECK);
-        if (objectAdapter.isTitleAvailable()) {
-            this.titleHint = objectAdapter.titleString();
+        
+        // REVIEW: this check is because Wicket 6.0.0 seems to call onEndRequest prior to onDetach
+        // so by the time we get here, there is no session to use...
+        if(IsisContext.inSession()) {
+            ObjectAdapter objectAdapter = this.getObjectAdapter(ConcurrencyChecking.NO_CHECK);
+            if (objectAdapter.isTitleAvailable()) {
+                this.titleHint = objectAdapter.titleString();
+            }
         }
     }
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/mementos/PageParameterNames.java Mon Sep 17 20:28:37 2012
@@ -19,7 +19,7 @@
 
 package org.apache.isis.viewer.wicket.model.mementos;
 
-import org.apache.wicket.PageParameters;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.core.metamodel.adapter.oid.Oid;
 import org.apache.isis.viewer.wicket.model.util.Strings;
@@ -86,7 +86,8 @@ public enum PageParameterNames {
     }
 
     public String getFrom(final PageParameters pageParameters) {
-        return pageParameters.getString(this.toString());
+        //return pageParameters.getString(this.toString());
+        return pageParameters.get(this.toString()).toString();
     }
 
     public void addTo(final PageParameters pageParameters, final String value) {

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=1386814&r1=1386813&r2=1386814&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 Mon Sep 17 20:28:37 2012
@@ -27,8 +27,7 @@ import java.util.regex.Pattern;
 import com.google.common.collect.Maps;
 
 import org.apache.wicket.Component;
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.applib.Identifier;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -341,8 +340,12 @@ public class ActionModel extends ModelAb
         return actionMemento;
     }
 
-    @Override
-    public ObjectAdapter getObject() {
+//    @Override
+//    public ObjectAdapter getObject() {
+//        return reExecute();
+//    }
+
+    private ObjectAdapter reExecute() {
         detach(); // force re-execute
         final ObjectAdapter result = super.getObject();
         arguments.clear();
@@ -351,8 +354,16 @@ public class ActionModel extends ModelAb
 
     @Override
     protected ObjectAdapter load() {
+        
+        // from getObject()/reExecute
+        detach(); // force re-execute
+        
         final ObjectAdapter results = executeAction();
         this.actionMode = Mode.RESULTS;
+        
+        // from getObject()/reExecute
+        arguments.clear();
+        
         return results;
     }
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.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/EntityModel.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/EntityModel.java Mon Sep 17 20:28:37 2012
@@ -24,8 +24,8 @@ import java.util.Map;
 
 import com.google.common.collect.Maps;
 
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.markup.html.PackageResource;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.request.resource.PackageResource;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
@@ -371,37 +371,6 @@ public class EntityModel extends ModelAb
 
 
     // //////////////////////////////////////////////////////////
-    // lookupImageResource
-    // //////////////////////////////////////////////////////////
-
-    public PackageResource lookupImageResource(final ImageResourceCache imageResourceCache) {
-        PackageResource imageResource = null;
-        try {
-            final ObjectAdapter objectAdapter = getObject();
-            ObjectSpecification typeOfSpec = objectAdapter.getSpecification();
-            final IconFacet iconFacet = typeOfSpec.getFacet(IconFacet.class);
-            if (iconFacet != null) {
-                final String iconName = iconFacet.iconName(objectAdapter);
-                imageResource = imageResourceCache.findImageResource(iconName);
-            }
-            if(imageResource != null) {
-                return imageResource;
-            }
-            typeOfSpec = getTypeOfSpecification();
-            imageResource = imageResourceCache.findImage(typeOfSpec);
-            if(imageResource != null) {
-                return imageResource;
-            }
-            return null;
-        } finally {
-            if(imageResource != null) {
-                imageResource.setCacheable(true);
-            }
-        }
-    }
-
-
-    // //////////////////////////////////////////////////////////
     // Dependencies (from context)
     // //////////////////////////////////////////////////////////
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ImageResourceCache.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/ImageResourceCache.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ImageResourceCache.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-model/src/main/java/org/apache/isis/viewer/wicket/model/models/ImageResourceCache.java Mon Sep 17 20:28:37 2012
@@ -19,7 +19,7 @@
 
 package org.apache.isis.viewer.wicket.model.models;
 
-import org.apache.wicket.markup.html.PackageResource;
+import org.apache.wicket.request.resource.PackageResource;
 
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 

Copied: incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/java/viewer/wicket/app/application.css (from r1386804, incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/webapp/application.css)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/java/viewer/wicket/app/application.css?p2=incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/java/viewer/wicket/app/application.css&p1=incubator/isis/trunk/framework/viewer/wicket/wicket-tck/src/main/webapp/application.css&r1=1386804&r2=1386814&rev=1386814&view=diff
==============================================================================
    (empty)

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/pom.xml Mon Sep 17 20:28:37 2012
@@ -89,19 +89,19 @@
 			<artifactId>wicket-auth-roles</artifactId>
 		</dependency>
 
+<!-- 
 		<dependency>
 			<groupId>org.wicketstuff</groupId>
 			<artifactId>scriptaculous</artifactId>
 		</dependency>
-
+-->
 <!-- 
 		<dependency>
 			<groupId>org.wicketstuff</groupId>
 			<artifactId>objectautocomplete</artifactId>
 		</dependency>
--->
+ -->
 
-		<!-- Dependency Injection support -->
 		<dependency>
 			<groupId>org.apache.wicket</groupId>
 			<artifactId>wicket-guice</artifactId>

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.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/actions/ActionPanel.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/actions/ActionPanel.java Mon Sep 17 20:28:37 2012
@@ -22,7 +22,6 @@ package org.apache.isis.viewer.wicket.ui
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.wicket.PageParameters;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.model.Model;
 
@@ -39,6 +38,7 @@ import org.apache.isis.viewer.wicket.mod
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
 import org.apache.isis.viewer.wicket.model.models.ValueModel;
 import org.apache.isis.viewer.wicket.ui.ComponentType;
+import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.entity.EntityPage;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 
@@ -180,7 +180,8 @@ public class ActionPanel extends PanelAb
                     final EntityPage entityPage = new EntityPage(actualAdapter, exIfAny);
                     
                     // "redirect-after-post"
-                    panel.setRedirect(true);
+                    
+                    // panel.setRedirect(true); // no longer required, http://mail-archives.apache.org/mod_mbox/wicket-users/201103.mbox/%3CAANLkTin3NmEBaMY9CF8diXA+wTMamQPc2O+tWvG_HCiW@mail.gmail.com%3E
                     panel.setResponsePage(entityPage);
                     
                 } else if (singleResultsMode == ActionModel.SingleResultsMode.SELECT) {
@@ -214,7 +215,8 @@ public class ActionPanel extends PanelAb
                 if (selectionHandler != null) {
                     collectionModel.setSelectionHandler(selectionHandler);
                 }
-                panel.getComponentFactoryRegistry().addOrReplaceComponent(panel, ComponentType.COLLECTION_CONTENTS, collectionModel);
+                final ComponentFactoryRegistry componentFactoryRegistry = panel.getComponentFactoryRegistry();
+                componentFactoryRegistry.addOrReplaceComponent(panel, ComponentType.COLLECTION_CONTENTS, collectionModel);
             }
         },
         EMPTY {

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=1386814&r1=1386813&r2=1386814&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 Mon Sep 17 20:28:37 2012
@@ -21,8 +21,8 @@ package org.apache.isis.viewer.wicket.ui
 
 import org.apache.wicket.Application;
 import org.apache.wicket.Page;
-import org.apache.wicket.PageParameters;
 import org.apache.wicket.markup.html.link.AbstractLink;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
 import org.apache.isis.core.metamodel.spec.feature.ObjectAction;

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=1386814&r1=1386813&r2=1386814&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 Mon Sep 17 20:28:37 2012
@@ -60,22 +60,22 @@ public class CollectionContentsAsAjaxTab
     private void buildGui() {
         final EntityCollectionModel model = getModel();
 
-        final List<IColumn<ObjectAdapter>> columns = Lists.newArrayList();
+        final List<IColumn<ObjectAdapter,String>> columns = Lists.newArrayList();
 
         addTitleColumn(columns);
         addPropertyColumnsIfRequired(columns);
         addSelectedButtonIfRequired(columns);
 
-        final SortableDataProvider<ObjectAdapter> dataProvider = new CollectionContentsSortableDataProvider(model);
-        final AjaxFallbackDefaultDataTable<ObjectAdapter> dataTable = new AjaxFallbackDefaultDataTable<ObjectAdapter>("table", columns, dataProvider, model.getPageSize());
+        final SortableDataProvider<ObjectAdapter,String> dataProvider = new CollectionContentsSortableDataProvider(model);
+        final AjaxFallbackDefaultDataTable<ObjectAdapter,String> dataTable = new AjaxFallbackDefaultDataTable<ObjectAdapter,String>("table", columns, dataProvider, model.getPageSize());
         add(dataTable);
     }
 
-    private void addTitleColumn(final List<IColumn<ObjectAdapter>> columns) {
+    private void addTitleColumn(final List<IColumn<ObjectAdapter,String>> columns) {
         columns.add(new ObjectAdapterTitleColumn());
     }
 
-    private void addPropertyColumnsIfRequired(final List<IColumn<ObjectAdapter>> columns) {
+    private void addPropertyColumnsIfRequired(final List<IColumn<ObjectAdapter,String>> columns) {
         final ObjectSpecification typeOfSpec = getModel().getTypeOfSpecification();
         if (getModel().hasSelectionHandler()) {
             return;
@@ -92,7 +92,7 @@ public class CollectionContentsAsAjaxTab
         }
     }
 
-    private void addSelectedButtonIfRequired(final List<IColumn<ObjectAdapter>> columns) {
+    private void addSelectedButtonIfRequired(final List<IColumn<ObjectAdapter,String>> columns) {
         if (!getModel().hasSelectionHandler()) {
             return;
         }

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.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/CollectionContentsSortableDataProvider.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/CollectionContentsSortableDataProvider.java Mon Sep 17 20:28:37 2012
@@ -35,7 +35,7 @@ import org.apache.isis.viewer.wicket.mod
  * <p>
  * TODO: not yet fully supported.
  */
-public class CollectionContentsSortableDataProvider extends SortableDataProvider<ObjectAdapter> {
+public class CollectionContentsSortableDataProvider extends SortableDataProvider<ObjectAdapter,String> {
 
     private static final long serialVersionUID = 1L;
 
@@ -46,8 +46,8 @@ public class CollectionContentsSortableD
     }
 
     @Override
-    public Iterator<ObjectAdapter> iterator(final int first, final int count) {
-        return model.getObject().subList(first, first + count).iterator();
+    public Iterator<ObjectAdapter> iterator(final long first, final long count) {
+        return model.getObject().subList((int)first, (int)(first + count)).iterator();
     }
 
     @Override
@@ -56,7 +56,7 @@ public class CollectionContentsSortableD
     }
 
     @Override
-    public int size() {
+    public long size() {
         return model.getObject().size();
     }
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/columns/ColumnAbstract.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/columns/ColumnAbstract.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/columns/ColumnAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/collectioncontents/ajaxtable/columns/ColumnAbstract.java Mon Sep 17 20:28:37 2012
@@ -38,7 +38,7 @@ import org.apache.isis.viewer.wicket.ui.
  * <p>
  * Part of the implementation of {@link CollectionContentsAsAjaxTable}.
  */
-public abstract class ColumnAbstract<T> extends AbstractColumn<T> {
+public abstract class ColumnAbstract<T> extends AbstractColumn<T,String> {
 
     private static final long serialVersionUID = 1L;
 

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=1386814&r1=1386813&r2=1386814&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 Mon Sep 17 20:28:37 2012
@@ -21,9 +21,9 @@ package org.apache.isis.viewer.wicket.ui
 
 import org.apache.wicket.Application;
 import org.apache.wicket.Page;
-import org.apache.wicket.PageParameters;
 import org.apache.wicket.markup.html.link.AbstractLink;
 import org.apache.wicket.markup.html.link.Link;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/icontitle/EntityIconAndTitlePanel.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/icontitle/EntityIconAndTitlePanel.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/icontitle/EntityIconAndTitlePanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/icontitle/EntityIconAndTitlePanel.java Mon Sep 17 20:28:37 2012
@@ -22,15 +22,13 @@ package org.apache.isis.viewer.wicket.ui
 import com.google.inject.Inject;
 
 import org.apache.wicket.Page;
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.ResourceReference;
-import org.apache.wicket.markup.html.PackageResource;
-import org.apache.wicket.markup.html.PackageResourceReference;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.link.AbstractLink;
-import org.apache.wicket.markup.html.resources.PackagedResourceReference;
+import org.apache.wicket.request.mapper.parameter.PageParameters;
+import org.apache.wicket.request.resource.PackageResourceReference;
+import org.apache.wicket.request.resource.ResourceReference;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.viewer.wicket.model.models.EntityModel;
@@ -40,7 +38,6 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistryAccessor;
 import org.apache.isis.viewer.wicket.ui.pages.PageType;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-import org.apache.isis.viewer.wicket.ui.util.CssClassAppender;
 import org.apache.isis.viewer.wicket.ui.util.Links;
 
 /**
@@ -101,7 +98,7 @@ public class EntityIconAndTitlePanel ext
         final Class<?> correspondingClass = entityModel.getObject().getSpecification().getCorrespondingClass();
         final String specName = correspondingClass.getSimpleName();
 
-        final ResourceReference imageResource = new ResourceReference(correspondingClass, specName + ".png");
+        final ResourceReference imageResource = new PackageResourceReference(correspondingClass, specName + ".png");
         image = new Image(ID_ENTITY_ICON, imageResource);
         link.addOrReplace(image);
         

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsReadOnlyFormPanel.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/EntityCollectionsReadOnlyFormPanel.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsReadOnlyFormPanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityCollectionsReadOnlyFormPanel.java Mon Sep 17 20:28:37 2012
@@ -184,7 +184,8 @@ public class EntityCollectionsReadOnlyFo
 
         private void requestRepaintPanel(final AjaxRequestTarget target) {
             if (target != null) {
-                target.addComponent(owningPanel);
+                //target.addComponent(owningPanel);
+                target.add(owningPanel);
             }
         }
 

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityPropertiesAndOrCollectionsPanel.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/EntityPropertiesAndOrCollectionsPanel.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityPropertiesAndOrCollectionsPanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/blocks/propcoll/EntityPropertiesAndOrCollectionsPanel.java Mon Sep 17 20:28:37 2012
@@ -31,14 +31,13 @@ import org.apache.wicket.markup.html.bas
 import org.apache.wicket.markup.html.form.Button;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.FormComponent;
-import org.apache.wicket.markup.html.form.IFormSubmittingComponent;
-import org.apache.wicket.markup.html.form.IFormVisitorParticipant;
 import org.apache.wicket.markup.html.form.validation.AbstractFormValidator;
 import org.apache.wicket.markup.html.panel.ComponentFeedbackPanel;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
 import org.apache.wicket.markup.repeater.RepeatingView;
-import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
+import org.apache.wicket.util.visit.IVisit;
+import org.apache.wicket.util.visit.IVisitor;
 
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.applib.filter.Filter;
@@ -314,16 +313,25 @@ public class EntityPropertiesAndOrCollec
                 protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
                     Session.get().getFeedbackMessages().clear();
                     getForm().clearInput();
-                    getForm().visitFormComponentsPostOrder(new IVisitor() {
+                    getForm().visitFormComponentsPostOrder(new IVisitor<FormComponent<?>, Void>() {
 
                         @Override
-                        public Object formComponent(final IFormVisitorParticipant formComponent) {
+                        public void component(FormComponent<?> formComponent, IVisit<Void> visit) {
                             if (formComponent instanceof CancelHintRequired) {
                                 final CancelHintRequired cancelHintRequired = (CancelHintRequired) formComponent;
                                 cancelHintRequired.onCancel();
                             }
-                            return null;
                         }
+
+//                        @Override
+//                        public Object formComponent(final IFormVisitorParticipant formComponent) {
+//                            if (formComponent instanceof CancelHintRequired) {
+//                                final CancelHintRequired cancelHintRequired = (CancelHintRequired) formComponent;
+//                                cancelHintRequired.onCancel();
+//                            }
+//                            return null;
+//                        }
+                    
                     });
                     getEntityModel().resetPropertyModels();
                     toViewMode(target);
@@ -342,12 +350,16 @@ public class EntityPropertiesAndOrCollec
 
         private void requestRepaintPanel(final AjaxRequestTarget target) {
             if (target != null) {
-                target.addComponent(owningPanel);
+//                target.addComponent(owningPanel);
+//                // TODO: is it necessary to add these too?
+//                target.addComponent(editButton);
+//                target.addComponent(okButton);
+//                target.addComponent(cancelButton);
+//                target.addComponent(feedback);
+                
+                target.add(owningPanel);
                 // TODO: is it necessary to add these too?
-                target.addComponent(editButton);
-                target.addComponent(okButton);
-                target.addComponent(cancelButton);
-                target.addComponent(feedback);
+                target.add(editButton, okButton, cancelButton, feedback);
             }
         }
 

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=1386814&r1=1386813&r2=1386814&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 Mon Sep 17 20:28:37 2012
@@ -24,13 +24,6 @@ import java.util.List;
 import com.google.inject.Inject;
 
 import org.apache.wicket.Component;
-import org.apache.wicket.Page;
-import org.apache.wicket.PageParameters;
-import org.apache.wicket.markup.html.PackageResource;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.markup.html.image.Image;
-import org.apache.wicket.markup.html.link.AbstractLink;
 
 import org.apache.isis.applib.annotation.Where;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -39,7 +32,6 @@ import org.apache.isis.core.metamodel.sp
 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.ObjectAssociationFilters;
 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;
@@ -52,10 +44,8 @@ import org.apache.isis.viewer.wicket.ui.
 import org.apache.isis.viewer.wicket.ui.components.widgets.cssmenu.CssMenuPanel;
 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.PageType;
 import org.apache.isis.viewer.wicket.ui.pages.action.ActionPage;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
-import org.apache.isis.viewer.wicket.ui.util.Links;
 
 /**
  * {@link PanelAbstract Panel} representing the summary details (title, icon and

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.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/scalars/ScalarPanelTextFieldAbstract.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldAbstract.java Mon Sep 17 20:28:37 2012
@@ -20,22 +20,16 @@
 package org.apache.isis.viewer.wicket.ui.components.scalars;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 
 import org.apache.wicket.AttributeModifier;
 import org.apache.wicket.Component;
-import org.apache.wicket.behavior.IBehavior;
-import org.apache.wicket.behavior.SimpleAttributeModifier;
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.AbstractTextComponent;
 import org.apache.wicket.markup.html.form.FormComponentLabel;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.panel.ComponentFeedbackPanel;
-import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
-import org.apache.wicket.validation.IValidator;
 
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facets.SingleIntValueFacet;
 import org.apache.isis.core.metamodel.facets.maxlen.MaxLengthFacet;
 import org.apache.isis.core.metamodel.facets.typicallen.TypicalLengthFacet;

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldNumeric.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/scalars/ScalarPanelTextFieldNumeric.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldNumeric.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelTextFieldNumeric.java Mon Sep 17 20:28:37 2012
@@ -20,14 +20,12 @@
 package org.apache.isis.viewer.wicket.ui.components.scalars;
 
 import java.io.Serializable;
-import java.math.BigDecimal;
 
 import org.apache.wicket.Component;
 import org.apache.wicket.markup.html.form.AbstractTextComponent;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.IModel;
 
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 
 /**

Modified: incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/image/JavaAwtImagePanel.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/scalars/image/JavaAwtImagePanel.java?rev=1386814&r1=1386813&r2=1386814&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/image/JavaAwtImagePanel.java (original)
+++ incubator/isis/trunk/framework/viewer/wicket/wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/image/JavaAwtImagePanel.java Mon Sep 17 20:28:37 2012
@@ -32,10 +32,6 @@ import org.apache.isis.core.progmodel.fa
 import org.apache.isis.viewer.wicket.model.models.ScalarModel;
 import org.apache.isis.viewer.wicket.ui.panels.PanelAbstract;
 
-/**
- * {@link FormComponentPanel} representing a reference to an entity: a link and
- * a findUsing button.
- */
 public class JavaAwtImagePanel extends PanelAbstract<ScalarModel> {
 
     private static final long serialVersionUID = 1L;
@@ -58,12 +54,13 @@ public class JavaAwtImagePanel extends P
         final ObjectAdapter adapter = getModel().getObject();
         if (adapter != null) {
             final java.awt.Image imageValue = imageValueFacet.getImage(adapter);
-            final RenderedDynamicImageResource imageResource = new RenderedDynamicImageResource(imageValue.getWidth(null), imageValue.getHeight(null)) {
+            final RenderedDynamicImageResource imageResource = new RenderedDynamicImageResource(
+                    imageValue.getWidth(null), imageValue.getHeight(null)) {
 
                 private static final long serialVersionUID = 1L;
 
                 @Override
-                protected boolean render(final Graphics2D graphics) {
+                protected boolean render(final Graphics2D graphics, Attributes attributes) {
                     graphics.drawImage(imageValue, 0, 0, null);
                     return true;
                 }



Mime
View raw message